]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
MingW32 compilation works now.
[wxWidgets.git] / src / msw / window.cpp
index c7a84bd1f82af4bc6cfae14620c6470ab92d4533..8d185d64205bef6d592f33a9b3112e22c0daccc0 100644 (file)
@@ -31,6 +31,7 @@
 #ifndef WX_PRECOMP
     #include <windows.h>
     #include "wx/msw/winundef.h"
+    #include "wx/window.h"
     #include "wx/accel.h"
     #include "wx/setup.h"
     #include "wx/menu.h"
@@ -1421,7 +1422,7 @@ void wxWindow::GetCaretPos(int *x, int *y) const
 // popup menu
 // ---------------------------------------------------------------------------
 
-bool wxWindow::PopupMenu(wxMenu *menu, int x, int y)
+bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
 {
     menu->SetInvokingWindow(this);
     menu->UpdateUI();
@@ -1539,7 +1540,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
                                 btn = panel->GetDefaultItem();
                             }
 
-                            if ( btn )
+                            if ( btn && btn->IsEnabled() )
                             {
                                 // if we do have a default button, do press it
                                 btn->MSWCommand(BN_CLICKED, 0 /* unused */);
@@ -1827,8 +1828,8 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
         case WM_MBUTTONUP:
         case WM_MBUTTONDBLCLK:
             {
-                int x = LOWORD(lParam);
-                int y = HIWORD(lParam);
+                short x = LOWORD(lParam);
+                short y = HIWORD(lParam);
 
                 processed = HandleMouseEvent(message, x, y, wParam);
             }