]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mdi.cpp
include wx/crt.h needed for wxFprintf() (closes #9509)
[wxWidgets.git] / src / msw / mdi.cpp
index 25ff340af8f0af1dd797070737da79c2b255bf37..5225e86be57ba44b5faa8b93d86cfcbc97ede51a 100644 (file)
 #include "wx/stockitem.h"
 #include "wx/msw/private.h"
 
-#if wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR
-    #include "wx/msw/statbr95.h"
-#endif
-
 #include <string.h>
 
 // ---------------------------------------------------------------------------
@@ -522,8 +518,11 @@ bool wxMDIParentFrame::HandleActivate(int state, bool minimized, WXHWND activate
     return processed;
 }
 
-bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
+bool wxMDIParentFrame::HandleCommand(WXWORD id_, WXWORD cmd, WXHWND hwnd)
 {
+    // sign extend to int from short before comparing with the other int ids
+    int id = (signed short)id_;
+
     // In case it's e.g. a toolbar.
     if ( hwnd )
     {
@@ -756,7 +755,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
   wxWindowCreationHook hook(this);
 
   m_hWnd = (WXHWND)::SendMessage(GetWinHwnd(parent->GetClientWindow()),
-                                 WM_MDICREATE, 0, (LONG)(LPSTR)&mcs);
+                                 WM_MDICREATE, 0, (LPARAM)&mcs);
 
   if ( !m_hWnd )
   {
@@ -1013,8 +1012,11 @@ WXLRESULT wxMDIChildFrame::MSWWindowProc(WXUINT message,
     return rc;
 }
 
-bool wxMDIChildFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
+bool wxMDIChildFrame::HandleCommand(WXWORD id_, WXWORD cmd, WXHWND hwnd)
 {
+    // sign extend to int from short before comparing with the other int ids
+    int id = (signed short)id_;
+
     // In case it's e.g. a toolbar.
     if ( hwnd )
     {
@@ -1430,14 +1432,15 @@ static void InsertWindowMenu(wxWindow *win, WXHMENU menu, HMENU subMenu)
             {
                 success = true;
                 ::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING,
-                             (UINT)subMenu, _("&Window").wx_str());
+                             (UINT_PTR)subMenu, _("&Window").wx_str());
                 break;
             }
         }
 
         if ( !success )
         {
-            ::AppendMenu(hmenu, MF_POPUP, (UINT)subMenu, _("&Window").wx_str());
+            ::AppendMenu(hmenu, MF_POPUP,
+                         (UINT_PTR)subMenu, _("&Window").wx_str());
         }
     }