]> git.saurik.com Git - wxWidgets.git/commitdiff
VC warning fix and update to curent state of wxW.
authorWłodzimierz Skiba <abx@abx.art.pl>
Wed, 14 Jul 2004 19:30:00 +0000 (19:30 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Wed, 14 Jul 2004 19:30:00 +0000 (19:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/samples/fl/fl_demo2.cpp

index 9507011ed3db7c84e9400b763eaec2c0715f4aeb..dafbaa61ccee7af57179dbe75505ff369ce6e7c0 100644 (file)
@@ -489,17 +489,17 @@ wxTreeCtrl* MyFrame::CreateTreeCtrl( const wxString& label )
 {
     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
     {
-        pTree->AppendItem(rootid, _("Scully"), 0);
-        pTree->AppendItem(rootid, _("Mulder"), 0);
+        pTree->AppendItem(rootid, _("Leaf1"));
+        pTree->AppendItem(rootid, _("Leaf2"));
     }
 
     return pTree;