]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/html/widget/widget.cpp
fixed tex2rtf errors
[wxWidgets.git] / samples / html / widget / widget.cpp
index 54489fd12c7d8eff458d5b4feabdaf84e12fe949..667d7705aa3f0976bce51f82afda73897f2de3ef 100644 (file)
@@ -50,14 +50,14 @@ TAG_HANDLER_PROC(tag)
 
     if (tag.HasParam(wxT("FLOAT"))) fl = ax;
 
-    wnd = new wxTextCtrl(m_WParser->GetWindow(), -1, tag.GetParam(wxT("NAME")),
+    wnd = new wxTextCtrl(m_WParser->GetWindow(), wxID_ANY, tag.GetParam(wxT("NAME")),
         wxPoint(0,0), wxSize(ax, ay), wxTE_MULTILINE);
 
-    wnd->Show(TRUE);
+    wnd->Show(true);
 
     m_WParser->GetContainer()->InsertCell(new wxHtmlWidgetCell(wnd, fl));
 
-    return FALSE;
+    return false;
 }
 
 TAG_HANDLER_END(MYBIND)
@@ -154,17 +154,17 @@ bool MyApp::OnInit()
 {
     // Create the main application window
     MyFrame *frame = new MyFrame( _("wxHtmlWindow testing application"),
-        wxPoint(50, 50), wxSize(640, 480) );
+        wxDefaultPosition, wxSize(640, 480) );
 
     // Show it and tell the application that it's our main window
     // @@@ what does it do exactly, in fact? is it necessary here?
-    frame->Show(TRUE);
+    frame->Show(true);
     SetTopWindow(frame);
 
     // success: wxApp::OnRun() will be called which will enter the main message
-    // loop and the application will run. If we returned FALSE here, the
+    // loop and the application will run. If we returned false here, the
     // application would exit immediately.
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
@@ -175,7 +175,7 @@ wxHtmlWindow *html;
 
 // frame constructor
 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
-: wxFrame((wxFrame *)NULL, -1, title, pos, size)
+: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
 {
     // create a menu bar
     wxMenu *menuFile = new wxMenu;
@@ -193,11 +193,15 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
     // ... and attach this menu bar to the frame
     SetMenuBar(menuBar);
 
+#if wxUSE_STATUSBAR
     CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
 
     html = new wxHtmlWindow(this);
     html -> SetRelatedFrame(this, _("VFS Demo: '%s'"));
+#if wxUSE_STATUSBAR
     html -> SetRelatedStatusBar(1);
+#endif // wxUSE_STATUSBAR
     html -> LoadPage(wxT("start.htm"));
 }
 
@@ -206,8 +210,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
 
 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
-    // TRUE is to force the frame to close
-    Close(TRUE);
+    // true is to force the frame to close
+    Close(true);
 }
 
 void MyFrame::OnBack(wxCommandEvent& WXUNUSED(event))