Esempio n. 1
0
LOCAL void Palette_OnPaint(HWND hWindow)
/***********************************************************************/
{
PAINTSTRUCT ps;
HDC hDC;
RECT ClientRect;
LPPALETTE lpPalette;

if ( SuperPaint( hWindow ) )
	return; // Printing in progress... (SuperBlt not reentrant)
hDC = BeginPaint( hWindow, &ps );
GetClientRect( hWindow, &ClientRect );
lpPalette = (LPPALETTE)GetWindowLong(hWindow, GWL_PALETTE);
if (lpPalette)
	{
	EraseControlBackground( hDC, hWindow, &ClientRect, CTLCOLOR_CUSTOM );
	if (bHasFocus)
		{
		InflateRect(&ClientRect, -1, -1);
		FrameRect( hDC,&ClientRect,(HBRUSH)GetStockObject(BLACK_BRUSH));
		}
	Palette_Paint(hDC, hWindow);
	Palette_Select(hDC, hWindow, (int)GetWindowLong(hWindow, GWL_SELECT), ON);
	}
else
	{
	EraseControlBackground( hDC, hWindow, &ClientRect, CTLCOLOR_STATIC );
	}
EndPaint( hWindow, &ps );
}
Esempio n. 2
0
LOCAL void ZoomBox_OnPaint(HWND hWnd)
/***********************************************************************/
{
if ( !SuperPaint( hWnd ) )
	ZoomPaint(hWnd);
}