]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_dlg.cpp
use standard colour for the selected tree item text as well as background
[wxWidgets.git] / src / xrc / xh_dlg.cpp
index ebeba3a8310b58f810e7f73511528e9efbfe7a4d..d44ad16a91343d98db7ba7900714889dad585faf 100644 (file)
@@ -7,7 +7,7 @@
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
+
 #ifdef __GNUG__
 #pragma implementation "xh_dlg.h"
 #endif
@@ -46,11 +46,9 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler()
 }
 
 wxObject *wxDialogXmlHandler::DoCreateResource()
-{ 
-    wxDialog *dlg = wxDynamicCast(m_instance, wxDialog);
-    
-    wxASSERT_MSG(dlg, _("XRC resource: Cannot create dialog without instance."));
-    
+{
+    XRC_MAKE_INSTANCE(dlg, wxDialog);
+
     dlg->Create(m_parentAsWindow,
                 GetID(),
                 GetText(wxT("title")),
@@ -66,10 +64,10 @@ wxObject *wxDialogXmlHandler::DoCreateResource()
     SetupWindow(dlg);
 
     CreateChildren(dlg);
-    
+
     if (GetBool(wxT("centered"), FALSE))
         dlg->Centre();
-    
+
     return dlg;
 }