]> granicus.if.org Git - nethack/commitdiff
win32 bits for main trunk (from <Someone>)
authornethack.allison <nethack.allison>
Wed, 20 Aug 2003 11:39:57 +0000 (11:39 +0000)
committernethack.allison <nethack.allison>
Wed, 20 Aug 2003 11:39:57 +0000 (11:39 +0000)
- 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

doc/fixes35.0
win/win32/mhmain.c
win/win32/mhmsgwnd.c
win/win32/mswproc.c

index 603ad44be49235dc1017cf5730e7005be3f005d4..106c80edf8326e4e4b53453b0998d44f1b84fa22 100644 (file)
@@ -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
index 65658dcaf6fe2db41c4ed28695eb30f5a3aadf15..1ff7285851f93fa8cfcc3add9fd75e42e71268bf 100644 (file)
@@ -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;
 
index bcab40806373de0af3d1bcaf484eb5d016acf7e0..169efc954483d6522c6c059728106c6e8fe90a62 100644 (file)
@@ -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; 
 
index 52d0137becb6c5a9472f2c5a50a7a2cb5a7497f4..b8a43874b4528df56767700ceff11791f1bd5ed7 100644 (file)
@@ -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);