fix ugly headers when using large fonts
This commit is contained in:
@@ -156,14 +156,33 @@ static BOOL CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||
Win32RestartProgram();
|
||||
/* not reached */
|
||||
ASSERT( 0 );
|
||||
|
||||
EndDialog( hWnd, 0 );
|
||||
break;
|
||||
|
||||
case IDOK:
|
||||
EndDialog( hWnd, 0 );
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case WM_CTLCOLORSTATIC:
|
||||
{
|
||||
HDC hdc = (HDC)wParam;
|
||||
HWND hwndStatic = (HWND)lParam;
|
||||
HBRUSH hbr = NULL;
|
||||
|
||||
// TODO: Change any attributes of the DC here
|
||||
switch( GetDlgCtrlID(hwndStatic) )
|
||||
{
|
||||
case IDC_STATIC_HEADER_TEXT:
|
||||
case IDC_STATIC_ICON:
|
||||
hbr = (HBRUSH)::GetStockObject(WHITE_BRUSH);
|
||||
SetBkMode( hdc, OPAQUE );
|
||||
SetBkColor( hdc, RGB(255,255,255) );
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO: Return a different brush if the default is not desired
|
||||
return (BOOL)hbr;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user