]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
Explicitly include X11/Xlib.h to fix AIX build.
[wxWidgets.git] / src / msw / notebook.cpp
index db3df7f5387404d1f4b0493b5d40716ad57d0f42..e69fd60c43b2859307031a05f0e2798971e88edc 100644 (file)
@@ -138,8 +138,6 @@ END_EVENT_TABLE()
 // common part of all ctors
 void wxNotebook::Init()
 {
-    m_imageList = NULL;
-
 #if wxUSE_UXTHEME
     m_hbrBackground = NULL;
 #endif // wxUSE_UXTHEME
@@ -1314,10 +1312,12 @@ bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result)
   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());
 
+  bool processed = HandleWindowEvent(event);
   *result = !event.IsAllowed();
   return processed;
 }