X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..dcb39c53303d1ec6884f7bcd7bc9dc101e560e62:/contrib/utils/convertrc/convert.cpp?ds=sidebyside diff --git a/contrib/utils/convertrc/convert.cpp b/contrib/utils/convertrc/convert.cpp index 93d3626de0..b0eb0e569c 100644 --- a/contrib/utils/convertrc/convert.cpp +++ b/contrib/utils/convertrc/convert.cpp @@ -6,8 +6,7 @@ */ #ifdef __GNUG__ -#pragma implementation "convert.cpp" -#pragma interface "convert.cpp" +#pragma implementation "convert.h" #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -58,17 +57,17 @@ bool wxConvertApp::OnInit() SetAppName(_T("wxConvertApp")); if (HandleCommandLine()) - return TRUE; + return true; // Create the main frame window - m_pFrame = new wxMainFrame(NULL, -1, _T("wxConvertApp"), wxPoint(0, 0), wxSize(500, 400), + m_pFrame = new wxMainFrame(NULL, wxID_ANY, _T("wxConvertApp"), wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL); InitMenu(); - m_pFrame->Show(TRUE); + m_pFrame->Show(true); SetTopWindow(m_pFrame); - return TRUE; + return true; } void wxConvertApp::InitMenu() @@ -122,7 +121,7 @@ wxMainFrame::~wxMainFrame() void wxMainFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { - Close(TRUE); + Close(true); } @@ -192,7 +191,7 @@ bool wxConvertApp::HandleCommandLine() { if (argc != 2) - return FALSE; + return false; //Figure out kind of conversion wxString source,target; @@ -208,18 +207,18 @@ bool wxConvertApp::HandleCommandLine() if ((source.Find(_T(".wxr"))>0)&&(target.Find(_T(".xml"))>0)) { trans_wxr2xml.Convert(source,target); - return TRUE; + return true; } - else if ((source.Find(_T(".rc"))!=-1)&(target.Find(_T(".wxr"))!=-1)) + else if ((source.Find(_T(".rc"))!=wxNOT_FOUND)&(target.Find(_T(".wxr"))!=wxNOT_FOUND)) { trans_rc2wxr.Convert(source,target); - return TRUE; + return true; } - else if ((source.Find(_T(".rc"))!=-1)&(target.Find(_T(".xml"))!=-1)) + else if ((source.Find(_T(".rc"))!=wxNOT_FOUND)&(target.Find(_T(".xml"))!=wxNOT_FOUND)) { trans_rc2xml.Convert(source,target); - return TRUE; + return true; } - return FALSE; + return false; }