]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_toolb.cpp
security fix to wxSingleInstanceChecker: check if the lock file was really created...
[wxWidgets.git] / src / xrc / xh_toolb.cpp
index 4e472a3dc9a1e8afe7ce9325312b5b7a33171885..9bc524dc34c25f5751f34bfd583e146c5b39174b 100644 (file)
@@ -39,6 +39,7 @@ wxToolBarXmlHandler::wxToolBarXmlHandler()
     XRC_ADD_STYLE(wxTB_NOICONS);
     XRC_ADD_STYLE(wxTB_NODIVIDER);
     XRC_ADD_STYLE(wxTB_NOALIGN);
+    AddWindowStyles();
 }
 
 wxObject *wxToolBarXmlHandler::DoCreateResource()
@@ -148,8 +149,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
 
         toolbar->Realize();
 
-        // FIXME: how can I create a toolbar without immediately setting it to the frame?
-        if (m_parentAsWindow)
+        if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe")))
         {
             wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame);
             if (parentFrame)