More (from <Someone>)
This commit is contained in:
@@ -31,12 +31,13 @@ extern HFONT extrainfo_splash_font;
|
|||||||
void mswin_display_splash_window (BOOL show_ver)
|
void mswin_display_splash_window (BOOL show_ver)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
RECT rt;
|
int left, top;
|
||||||
RECT splashrt;
|
RECT splashrt;
|
||||||
RECT clientrt;
|
RECT clientrt;
|
||||||
RECT controlrt;
|
RECT controlrt;
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
int buttop;
|
int buttop;
|
||||||
|
HDC hDC;
|
||||||
|
|
||||||
hWnd = CreateDialog(GetNHApp()->hApp, MAKEINTRESOURCE(IDD_SPLASH),
|
hWnd = CreateDialog(GetNHApp()->hApp, MAKEINTRESOURCE(IDD_SPLASH),
|
||||||
GetNHApp()->hMainWnd, NHSplashWndProc);
|
GetNHApp()->hMainWnd, NHSplashWndProc);
|
||||||
@@ -57,10 +58,12 @@ void mswin_display_splash_window (BOOL show_ver)
|
|||||||
splashrt.right += SPLASH_WIDTH + SPLASH_OFFSET_X * 2 - clientrt.right;
|
splashrt.right += SPLASH_WIDTH + SPLASH_OFFSET_X * 2 - clientrt.right;
|
||||||
splashrt.bottom += SPLASH_HEIGHT + controlrt.bottom + SPLASH_OFFSET_Y * 3 - clientrt.bottom;
|
splashrt.bottom += SPLASH_HEIGHT + controlrt.bottom + SPLASH_OFFSET_Y * 3 - clientrt.bottom;
|
||||||
/* Place the window centered */
|
/* Place the window centered */
|
||||||
GetWindowRect(GetNHApp()->hMainWnd, &rt);
|
/* On the screen, not on the parent window */
|
||||||
rt.left += (rt.right - rt.left - splashrt.right) / 2;
|
hDC = CreateDC("DISPLAY", NULL, NULL, NULL);
|
||||||
rt.top += (rt.bottom - rt.top - splashrt.bottom) / 2;
|
left = (GetDeviceCaps(hDC, HORZRES) - splashrt.right) / 2;
|
||||||
MoveWindow(hWnd, rt.left, rt.top, splashrt.right, splashrt.bottom, TRUE);
|
top = (GetDeviceCaps(hDC, VERTRES) - splashrt.bottom) / 2;
|
||||||
|
DeleteDC(hDC);
|
||||||
|
MoveWindow(hWnd, left, top, splashrt.right, splashrt.bottom, TRUE);
|
||||||
/* Place the OK control */
|
/* Place the OK control */
|
||||||
GetClientRect (hWnd, &clientrt);
|
GetClientRect (hWnd, &clientrt);
|
||||||
MoveWindow (GetDlgItem(hWnd, IDOK),
|
MoveWindow (GetDlgItem(hWnd, IDOK),
|
||||||
|
|||||||
@@ -325,6 +325,7 @@ STRINGTABLE DISCARDABLE
|
|||||||
BEGIN
|
BEGIN
|
||||||
IDS_APP_TITLE "NetHack for Windows - Graphical Interface"
|
IDS_APP_TITLE "NetHack for Windows - Graphical Interface"
|
||||||
IDC_NETHACKW "NETHACKW"
|
IDC_NETHACKW "NETHACKW"
|
||||||
|
IDS_APP_TITLE_SHORT "NetHack for Windows"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
#endif // English (U.S.) resources
|
||||||
|
|||||||
Reference in New Issue
Block a user