]> git.saurik.com Git - wxWidgets.git/commitdiff
return int from wxGetWindowId(), not WORD, to ensure comparing it with wxWindowID...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Nov 2007 02:03:15 +0000 (02:03 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Nov 2007 02:03:15 +0000 (02:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/private.h
src/msw/mdi.cpp
src/msw/utilsgui.cpp

index da4b7e83caced8a5ebf2725f043fb3d5c794884d..f31355f2cbc7f5356053d5c0884fde0e8435aeb5 100644 (file)
@@ -866,7 +866,7 @@ extern WXDLLEXPORT wxString wxGetWindowClass(WXHWND hWnd);
 
 // get the window id (should be unsigned, hence this is not wxWindowID which
 // is, for mainly historical reasons, signed)
-extern WXDLLEXPORT WXWORD wxGetWindowId(WXHWND hWnd);
+extern WXDLLEXPORT int wxGetWindowId(WXHWND hWnd);
 
 // check if hWnd's WNDPROC is wndProc. Return true if yes, false if they are
 // different
index 7114765e93ab331640e7612d3386d34ab33b4a10..774ee9b4a36c6cfd061150e8e7e5e34968c854e2 100644 (file)
@@ -601,8 +601,8 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
             wxWindow *child = node->GetData();
             if ( child->GetHWND() )
             {
-                long childId = wxGetWindowId(child->GetHWND());
-                if (childId == (long)id)
+                int childId = wxGetWindowId(child->GetHWND());
+                if ( childId == (signed short)id )
                 {
                     ::SendMessage( GetWinHwnd(GetClientWindow()),
                                    WM_MDIACTIVATE,
index f01babae85c64d8784aef0c9e0a858d3c914f0fa..e3c65df0812381d3185999e874f6c0e98d32f94f 100644 (file)
@@ -293,9 +293,9 @@ wxString WXDLLEXPORT wxGetWindowClass(WXHWND hWnd)
     return str;
 }
 
-WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
+int WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
 {
-    return (WXWORD)GetWindowLong((HWND)hWnd, GWL_ID);
+    return ::GetWindowLong((HWND)hWnd, GWL_ID);
 }
 
 // ----------------------------------------------------------------------------