From: nethack.allison Date: Wed, 20 Aug 2003 11:39:57 +0000 (+0000) Subject: win32 bits for main trunk (from ) X-Git-Tag: MOVE2GIT~1842 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fd577124bbff3c01928e01af5bdb7d6c64f6404;p=nethack win32 bits for main trunk (from ) - set correct checkmark on "Lock Windows" menu item on startup - redraw message window on resizing (it does not update properly otherwise) - fixed copy/paste error in read registry settings function --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 603ad44be..106c80edf 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -34,6 +34,9 @@ Platform- and/or Interface-Specific Fixes ----------------------------------------- win32gui: better handling of "more" prompt for messages that would have scrolled off the window +win32gui: set correct checkmark on "Lock Windows" menu item on startup +win32gui: redraw message window on resizing (it does not update properly otherwise) +win32gui: fixed copy/paste error in read registry settings function General New Features diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index 65658dcaf..1ff728585 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -188,6 +188,15 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar data->mapAcsiiModeSave = MAP_MODE_ASCII12x16; SetWindowLong(hWnd, GWL_USERDATA, (LONG)data); + /* update menu items */ + CheckMenuItem( + GetMenu(hWnd), + IDM_SETTING_LOCKWINDOWS, + MF_BYCOMMAND | + (GetNHApp()->bWindowsLocked? MF_CHECKED : MF_UNCHECKED) + ); + + /* store handle to the mane menu in the application record */ GetNHApp()->hMainWnd = hWnd; break; diff --git a/win/win32/mhmsgwnd.c b/win/win32/mhmsgwnd.c index bcab40806..169efc954 100644 --- a/win/win32/mhmsgwnd.c +++ b/win/win32/mhmsgwnd.c @@ -212,6 +212,9 @@ LRESULT CALLBACK NHMessageWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM ScreenToClient(GetNHApp()->hMainWnd, (LPPOINT)&rt); ScreenToClient(GetNHApp()->hMainWnd, ((LPPOINT)&rt)+1); mswin_update_window_placement(NHW_MESSAGE, &rt); + + /* redraw window - it does not handle incremental resizing too well */ + InvalidateRect(hWnd, NULL, TRUE); } break; diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 52d0137be..b8a43874b 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -2294,10 +2294,10 @@ mswin_write_reg() NHSETREG_DWORD(TEXTRIGHT, GetNHApp()->rtTextWindow.right); NHSETREG_DWORD(TEXTTOP, GetNHApp()->rtTextWindow.top); NHSETREG_DWORD(TEXTBOTTOM, GetNHApp()->rtTextWindow.bottom); - NHSETREG_DWORD(TEXTLEFT, GetNHApp()->rtInvenWindow.left); - NHSETREG_DWORD(TEXTRIGHT, GetNHApp()->rtInvenWindow.right); - NHSETREG_DWORD(TEXTTOP, GetNHApp()->rtInvenWindow.top); - NHSETREG_DWORD(TEXTBOTTOM, GetNHApp()->rtInvenWindow.bottom); + NHSETREG_DWORD(INVENTLEFT, GetNHApp()->rtInvenWindow.left); + NHSETREG_DWORD(INVENTRIGHT, GetNHApp()->rtInvenWindow.right); + NHSETREG_DWORD(INVENTTOP, GetNHApp()->rtInvenWindow.top); + NHSETREG_DWORD(INVENTBOTTOM, GetNHApp()->rtInvenWindow.bottom); #undef NHSETREG_DWORD RegCloseKey(key);