]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_toolb.cpp
Applied patch [ 795491 ] Multimon sample compatibility with various conditions
[wxWidgets.git] / contrib / src / xrc / xh_toolb.cpp
index b35ee00b145d546eaf2061372dd3981639ab0e68..40fc9246df9891200836849962e6571156d72376 100644 (file)
@@ -25,6 +25,8 @@
 
 #if wxUSE_TOOLBAR
 
+IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler)
+
 wxToolBarXmlHandler::wxToolBarXmlHandler() 
 : wxXmlResourceHandler(), m_isInside(FALSE), m_toolbar(NULL)
 {
@@ -146,8 +148,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)