]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
wxInputConsumer
[wxWidgets.git] / src / msw / window.cpp
index 73cb9e08d3a897d449d0754f32757a463988702d..59e4c2a5f118d7f76cf4d7f29f2756268aa79ee0 100644 (file)
@@ -1554,24 +1554,6 @@ wxPoint wxWindowMSW::GetClientAreaOrigin() const
     return wxPoint(0, 0);
 }
 
-// Makes an adjustment to the window position (for example, a frame that has
-// a toolbar that it manages itself).
-void wxWindowMSW::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags)
-{
-    // don't do it for the dialogs/frames - they float independently of their
-    // parent
-    if ( !IsTopLevel() )
-    {
-        wxWindow *parent = GetParent();
-        if ( !(sizeFlags & wxSIZE_NO_ADJUSTMENTS) && parent )
-        {
-            wxPoint pt(parent->GetClientAreaOrigin());
-            x += pt.x;
-            y += pt.y;
-        }
-    }
-}
-
 // ---------------------------------------------------------------------------
 // text metrics
 // ---------------------------------------------------------------------------
@@ -3088,7 +3070,7 @@ bool wxWindowMSW::HandleSetFocus(WXHWND hwnd)
 {
     // notify the parent keeping track of focus for the kbd navigation
     // purposes that we got it
-    wxChildFocusEvent eventFocus(this);
+    wxChildFocusEvent eventFocus((wxWindow *)this);
     (void)GetEventHandler()->ProcessEvent(eventFocus);
 
 #if wxUSE_CARET
@@ -3193,7 +3175,8 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
 
     wxDropFilesEvent event(wxEVT_DROP_FILES, gwFilesDropped, files);
     event.m_eventObject = this;
-    event.m_pos.x = dropPoint.x; event.m_pos.x = dropPoint.y;
+    event.m_pos.x = dropPoint.x;
+    event.m_pos.y = dropPoint.y;
 
     bool rc = GetEventHandler()->ProcessEvent(event);
 
@@ -3302,9 +3285,9 @@ bool wxWindowMSW::MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *itemStruct)
 
 #if wxUSE_MENUS_NATIVE
     // is it a menu item?
-    if ( id == 0 )
+    DRAWITEMSTRUCT *pDrawStruct = (DRAWITEMSTRUCT *)itemStruct;
+    if ( id == 0 && pDrawStruct->CtlType == ODT_MENU )
     {
-        DRAWITEMSTRUCT *pDrawStruct = (DRAWITEMSTRUCT *)itemStruct;
         wxMenuItem *pMenuItem = (wxMenuItem *)(pDrawStruct->itemData);
 
         wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE );
@@ -3343,9 +3326,9 @@ bool wxWindowMSW::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
 {
 #if wxUSE_OWNER_DRAWN
     // is it a menu item?
-    if ( id == 0 )
+    MEASUREITEMSTRUCT *pMeasureStruct = (MEASUREITEMSTRUCT *)itemStruct;
+    if ( id == 0 && pMeasureStruct->CtlType == ODT_MENU )
     {
-        MEASUREITEMSTRUCT *pMeasureStruct = (MEASUREITEMSTRUCT *)itemStruct;
         wxMenuItem *pMenuItem = (wxMenuItem *)(pMeasureStruct->itemData);
 
         wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE );