use white background for header text and icon

This commit is contained in:
Chris Danford
2006-02-23 20:03:10 +00:00
parent 732bd2a29a
commit 6205025e9e
2 changed files with 76 additions and 55 deletions
@@ -631,7 +631,7 @@ public:
~CrashDialog(); ~CrashDialog();
protected: protected:
virtual bool HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam ); virtual BOOL HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam );
private: private:
void SetDialogInitial(); void SetDialogInitial();
@@ -665,7 +665,7 @@ void CrashDialog::SetDialogInitial()
ShowWindow( GetDlgItem(hDlg, IDC_BUTTON_AUTO_REPORT), true ); ShowWindow( GetDlgItem(hDlg, IDC_BUTTON_AUTO_REPORT), true );
} }
bool CrashDialog::HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam ) BOOL CrashDialog::HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam )
{ {
HWND hDlg = GetHwnd(); HWND hDlg = GetHwnd();
@@ -676,6 +676,27 @@ bool CrashDialog::HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam )
DialogUtil::SetHeaderFont( hDlg, IDC_STATIC_HEADER_TEXT ); DialogUtil::SetHeaderFont( hDlg, IDC_STATIC_HEADER_TEXT );
return TRUE; return TRUE;
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;
}
case WM_COMMAND: case WM_COMMAND:
switch(LOWORD(wParam)) switch(LOWORD(wParam))
{ {
@@ -15,7 +15,7 @@ public:
HWND GetHwnd() { return m_hWnd; } HWND GetHwnd() { return m_hWnd; }
protected: protected:
virtual bool HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam ) { return false; } virtual BOOL HandleMessage( UINT msg, WPARAM wParam, LPARAM lParam ) { return false; }
private: private:
static BOOL APIENTRY DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); static BOOL APIENTRY DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);