]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
Add some version checks to help compiling on OSX.
[wxWidgets.git] / src / msw / notebook.cpp
index db3df7f5387404d1f4b0493b5d40716ad57d0f42..1879bb2ba3df3c3f59009e00ce8eb1aadad33d12 100644 (file)
@@ -1314,10 +1314,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;
 }