]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
Read TIFF images from top to bottom instead of bottom to top.
[wxWidgets.git] / src / msw / notebook.cpp
index ea0df3addfd2b4e1d0fda98a131c2a01c9eec3c8..e69fd60c43b2859307031a05f0e2798971e88edc 100644 (file)
@@ -138,8 +138,6 @@ END_EVENT_TABLE()
 // common part of all ctors
 void wxNotebook::Init()
 {
 // common part of all ctors
 void wxNotebook::Init()
 {
-    m_imageList = NULL;
-
 #if wxUSE_UXTHEME
     m_hbrBackground = NULL;
 #endif // wxUSE_UXTHEME
 #if wxUSE_UXTHEME
     m_hbrBackground = NULL;
 #endif // wxUSE_UXTHEME
@@ -1146,28 +1144,6 @@ void wxNotebook::UpdateBgBrush()
     }
 }
 
     }
 }
 
-WXHBRUSH wxNotebook::MSWGetBgBrushForChild(WXHDC hDC, wxWindow *child)
-{
-    if ( m_hbrBackground )
-    {
-        // before drawing with the background brush, we need to position it
-        // correctly
-        RECT rc;
-        ::GetWindowRect(GetHwndOf(child), &rc);
-
-        ::MapWindowPoints(NULL, GetHwnd(), (POINT *)&rc, 1);
-
-        if ( !::SetBrushOrgEx((HDC)hDC, -rc.left, -rc.top, NULL) )
-        {
-            wxLogLastError(wxT("SetBrushOrgEx(notebook bg brush)"));
-        }
-
-        return m_hbrBackground;
-    }
-
-    return wxNotebookBase::MSWGetBgBrushForChild(hDC, child);
-}
-
 bool wxNotebook::MSWPrintChild(WXHDC hDC, wxWindow *child)
 {
     // solid background colour overrides themed background drawing
 bool wxNotebook::MSWPrintChild(WXHDC hDC, wxWindow *child)
 {
     // solid background colour overrides themed background drawing
@@ -1336,10 +1312,12 @@ bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result)
   event.SetEventObject(this);
   event.SetInt(idCtrl);
 
   event.SetEventObject(this);
   event.SetInt(idCtrl);
 
-  bool processed = HandleWindowEvent(event);
+  // Change the selection before generating the event as its handler should
+  // already see the new page selected.
   if ( hdr->code == TCN_SELCHANGE )
       UpdateSelection(event.GetSelection());
 
   if ( hdr->code == TCN_SELCHANGE )
       UpdateSelection(event.GetSelection());
 
+  bool processed = HandleWindowEvent(event);
   *result = !event.IsAllowed();
   return processed;
 }
   *result = !event.IsAllowed();
   return processed;
 }