]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/fl/fl_demo2.cpp
Avoid warnings from mgl headers if possible.
[wxWidgets.git] / contrib / samples / fl / fl_demo2.cpp
index 9507011ed3db7c84e9400b763eaec2c0715f4aeb..4c68a841012310653d6652e9042efd3750a40751 100644 (file)
@@ -96,7 +96,9 @@ bool MyApp::OnInit(void)
     menu_bar->Append(file_menu,   _("&File"));
     menu_bar->Append(active_menu, _("Active &Layout"));
 
     menu_bar->Append(file_menu,   _("&File"));
     menu_bar->Append(active_menu, _("Active &Layout"));
 
+#if wxUSE_STATUSBAR
     frame->CreateStatusBar(3);
     frame->CreateStatusBar(3);
+#endif // wxUSE_STATUSBAR
 
     frame->SetMenuBar(menu_bar);
 
 
     frame->SetMenuBar(menu_bar);
 
@@ -489,17 +491,17 @@ wxTreeCtrl* MyFrame::CreateTreeCtrl( const wxString& label )
 {
     wxTreeCtrl* pTree = new wxTreeCtrl( mpInternalFrm, wxID_ANY );
 
 {
     wxTreeCtrl* pTree = new wxTreeCtrl( mpInternalFrm, wxID_ANY );
 
-    const wxTreeItemId rootid = pTree->AppendItem( (long)0, label, 0);
+    const wxTreeItemId rootid = pTree->AddRoot(label);
 
 
-    if ( label[0] != 'X' )
+    if ( label.StartsWith(_T("X")) )
     {
     {
-        pTree->AppendItem(rootid, _("Leaf1"), 0);
-        pTree->AppendItem(rootid, _("Leaf2"), 0);
+        pTree->AppendItem(rootid, _("Scully"));
+        pTree->AppendItem(rootid, _("Mulder"));
     }
     else
     {
     }
     else
     {
-        pTree->AppendItem(rootid, _("Scully"), 0);
-        pTree->AppendItem(rootid, _("Mulder"), 0);
+        pTree->AppendItem(rootid, _("Leaf1"));
+        pTree->AppendItem(rootid, _("Leaf2"));
     }
 
     return pTree;
     }
 
     return pTree;