]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/frame.cpp
new wxStringTokenizer
[wxWidgets.git] / src / msw / frame.cpp
index 14b25e89b8c5ee359b34ffa8a0dafd967f20066b..1b2f3db2e9bde5d9046ab42e18b87a8d4c059083 100644 (file)
 
 extern wxWindowList wxModelessWindows;
 extern wxList WXDLLEXPORT wxPendingDelete;
-extern wxChar wxFrameClassName[];
+extern const wxChar *wxFrameClassName;
 extern wxMenu *wxCurrentPopupMenu;
 
 // ----------------------------------------------------------------------------
 // event tables
 // ----------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
 BEGIN_EVENT_TABLE(wxFrame, wxFrameBase)
     EVT_ACTIVATE(wxFrame::OnActivate)
     EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
 END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
-#endif
 
 // ============================================================================
 // implementation
@@ -561,6 +559,15 @@ bool wxFrame::MSWCreate(int id, wxWindow *parent, const wxChar *wclass, wxWindow
 // subwindow found.
 void wxFrame::OnActivate(wxActivateEvent& event)
 {
+    if ( !event.GetActive() )
+    {
+        event.Skip();
+
+        return;
+    }
+
+    wxLogTrace(_T("focus"), _T("wxFrame %08x activated."), m_hWnd);
+
     for ( wxWindowList::Node *node = GetChildren().GetFirst();
           node;
           node = node->GetNext() )
@@ -581,7 +588,7 @@ void wxFrame::OnActivate(wxActivateEvent& event)
            )
         {
             child->SetFocus();
-            return;
+            break;
         }
     }
 }