]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
fixed pasting of Unicode strings
[wxWidgets.git] / src / msw / window.cpp
index ccb40f124c422f417a96d782eec7295f78cdbc25..5c826bf7bca6513ce6b2cd504774404f8c77251e 100644 (file)
@@ -1737,6 +1737,12 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
     menu->SetInvokingWindow(this);
     menu->UpdateUI();
 
+    if ( x == -1 && y == -1 )
+    {
+        wxPoint mouse = ScreenToClient(wxGetMousePosition());
+        x = mouse.x; y = mouse.y;
+    }
+
     HWND hWnd = GetHwnd();
     HMENU hMenu = GetHmenuOf(menu);
     POINT point;
@@ -1905,8 +1911,8 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
                                 return true;
                             }
                             else // no default button
-                            {
 #endif // wxUSE_BUTTON
+                            {
                                 // this is a quick and dirty test for a text
                                 // control
                                 if ( !(lDlgCode & DLGC_HASSETSEL) )
@@ -2346,9 +2352,11 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
 #ifndef __WXWINCE__
         case WM_PRINT:
             {
+#if wxUSE_LISTCTRL
                 // Don't call the wx handlers in this case
                 if ( wxIsKindOf(this, wxListCtrl) )
                     break;
+#endif
 
                 if ( lParam & PRF_ERASEBKGND )
                     HandleEraseBkgnd((WXHDC)(HDC)wParam);
@@ -5794,6 +5802,8 @@ bool wxWindowMSW::UnregisterHotKey(int hotkeyId)
     return true;
 }
 
+#if wxUSE_ACCEL
+
 bool wxWindowMSW::HandleHotKey(WXWPARAM wParam, WXLPARAM lParam)
 {
     int hotkeyId = wParam;
@@ -5810,6 +5820,8 @@ bool wxWindowMSW::HandleHotKey(WXWPARAM wParam, WXLPARAM lParam)
     return GetEventHandler()->ProcessEvent(event);
 }
 
+#endif // wxUSE_ACCEL
+
 #endif // wxUSE_HOTKEY
 
 // Not tested under WinCE