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();
|
Win32RestartProgram();
|
||||||
/* not reached */
|
/* not reached */
|
||||||
ASSERT( 0 );
|
ASSERT( 0 );
|
||||||
|
|
||||||
EndDialog( hWnd, 0 );
|
EndDialog( hWnd, 0 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDOK:
|
case IDOK:
|
||||||
EndDialog( hWnd, 0 );
|
EndDialog( hWnd, 0 );
|
||||||
break;
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -943,6 +943,26 @@ BOOL APIENTRY CrashDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
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;
|
return FALSE;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
#define IDD_DISASM_CRASH 120
|
#define IDD_DISASM_CRASH 120
|
||||||
#define BITMAP_CRASH 121
|
#define BITMAP_CRASH 121
|
||||||
#define BITMAP_ERROR 129
|
#define BITMAP_ERROR 129
|
||||||
#define IDB_HEADER 131
|
|
||||||
#define IDC_SHOCKWAVEFLASH1 1000
|
#define IDC_SHOCKWAVEFLASH1 1000
|
||||||
#define IDC_BUTTON_RESTART 1001
|
#define IDC_BUTTON_RESTART 1001
|
||||||
#define IDM_TOGGLEFULLSCREEN 1002
|
#define IDM_TOGGLEFULLSCREEN 1002
|
||||||
@@ -35,6 +34,7 @@
|
|||||||
#define IDC_CHECK2 1019
|
#define IDC_CHECK2 1019
|
||||||
#define IDC_SPLASH 1020
|
#define IDC_SPLASH 1020
|
||||||
#define IDC_STATIC_HEADER_TEXT 1021
|
#define IDC_STATIC_HEADER_TEXT 1021
|
||||||
|
#define IDC_STATIC_ICON 1022
|
||||||
#define IDC_ASMBOX 1133
|
#define IDC_ASMBOX 1133
|
||||||
#define IDC_REGDUMP 1283
|
#define IDC_REGDUMP 1283
|
||||||
#define IDC_STATIC_BOMBREASON 1284
|
#define IDC_STATIC_BOMBREASON 1284
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 132
|
#define _APS_NEXT_RESOURCE_VALUE 132
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40009
|
#define _APS_NEXT_COMMAND_VALUE 40009
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1022
|
#define _APS_NEXT_CONTROL_VALUE 1023
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -31,16 +31,18 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
|
|||||||
CAPTION "Fatal Error"
|
CAPTION "Fatal Error"
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT,0,0,332,35
|
||||||
DEFPUSHBUTTON "Close",IDOK,265,215,60,15
|
DEFPUSHBUTTON "Close",IDOK,265,215,60,15
|
||||||
EDITTEXT IDC_EDIT_ERROR,5,59,320,151,ES_MULTILINE | ES_READONLY |
|
EDITTEXT IDC_EDIT_ERROR,5,59,320,151,ES_MULTILINE | ES_READONLY |
|
||||||
WS_VSCROLL | NOT WS_TABSTOP
|
WS_VSCROLL | NOT WS_TABSTOP
|
||||||
PUSHBUTTON "View Log",IDC_BUTTON_VIEW_LOG,8,215,74,15
|
PUSHBUTTON "View Log",IDC_BUTTON_VIEW_LOG,8,215,74,15
|
||||||
PUSHBUTTON "Report Error",IDC_BUTTON_REPORT,90,215,76,15
|
PUSHBUTTON "Report Error",IDC_BUTTON_REPORT,90,215,76,15
|
||||||
PUSHBUTTON "Restart Game",IDC_BUTTON_RESTART,175,215,80,15
|
PUSHBUTTON "Restart Game",IDC_BUTTON_RESTART,175,215,80,15
|
||||||
CONTROL 131,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
|
|
||||||
LTEXT "Specific details about the error are shown in the box below:",
|
LTEXT "Specific details about the error are shown in the box below:",
|
||||||
IDC_STATIC,7,45,319,11
|
IDC_STATIC,7,45,319,11
|
||||||
LTEXT "Fatal Error",IDC_STATIC_HEADER_TEXT,5,5,249,23
|
LTEXT "Fatal Error",IDC_STATIC_HEADER_TEXT,5,5,249,23
|
||||||
|
ICON IDI_ICON,IDC_STATIC_ICON,296,6,21,20
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,34,332,1
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_LOADING_DIALOG DIALOG 0, 0, 312, 82
|
IDD_LOADING_DIALOG DIALOG 0, 0, 312, 82
|
||||||
@@ -61,7 +63,6 @@ STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION
|
|||||||
CAPTION "Program Crash"
|
CAPTION "Program Crash"
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL 131,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
|
|
||||||
PUSHBUTTON "&View Crash Info",IDC_CRASH_SAVE,29,169,94,15
|
PUSHBUTTON "&View Crash Info",IDC_CRASH_SAVE,29,169,94,15
|
||||||
PUSHBUTTON "View &Log",IDC_VIEW_LOG,128,169,63,15
|
PUSHBUTTON "View &Log",IDC_VIEW_LOG,128,169,63,15
|
||||||
PUSHBUTTON "Report the &Error",IDC_BUTTON_REPORT,196,169,89,15
|
PUSHBUTTON "Report the &Error",IDC_BUTTON_REPORT,196,169,89,15
|
||||||
@@ -72,9 +73,12 @@ BEGIN
|
|||||||
LTEXT "A crash has occurred. Diagnostic information has been saved to a file called ""crashinfo.txt"" in the game program directory.",
|
LTEXT "A crash has occurred. Diagnostic information has been saved to a file called ""crashinfo.txt"" in the game program directory.",
|
||||||
IDC_STATIC,8,41,312,19
|
IDC_STATIC,8,41,312,19
|
||||||
LTEXT "Estimated call stack",IDC_STATIC,6,85,155,10
|
LTEXT "Estimated call stack",IDC_STATIC,6,85,155,10
|
||||||
LTEXT "Program Crash",IDC_STATIC_HEADER_TEXT,6,5,276,22
|
|
||||||
LTEXT "Crash reason:",IDC_STATIC,7,64,219,8
|
LTEXT "Crash reason:",IDC_STATIC,7,64,219,8
|
||||||
CTEXT "crash reason here",IDC_STATIC_BOMBREASON,6,72,322,11
|
CTEXT "crash reason here",IDC_STATIC_BOMBREASON,6,72,322,11
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_WHITERECT,0,0,332,35
|
||||||
|
LTEXT "Program Crash",IDC_STATIC_HEADER_TEXT,5,5,249,23
|
||||||
|
ICON IDI_ICON,IDC_STATIC_ICON,296,6,21,20
|
||||||
|
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,34,332,1
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_OK DIALOGEX 0, 0, 336, 98
|
IDD_OK DIALOGEX 0, 0, 336, 98
|
||||||
@@ -200,13 +204,6 @@ BEGIN
|
|||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Bitmap
|
|
||||||
//
|
|
||||||
|
|
||||||
IDB_HEADER BITMAP "header.bmp"
|
|
||||||
#endif // English (U.S.) resources
|
#endif // English (U.S.) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
Reference in New Issue
Block a user