X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/457814b5aa2ee5c83abc65a6aee2a3ebcb1af34f..3ad5e06b4aefdcef8a1ec2ec563540e055462e66:/samples/validate/validate.cpp diff --git a/samples/validate/validate.cpp b/samples/validate/validate.cpp index 70e5c07232..334150af31 100644 --- a/samples/validate/validate.cpp +++ b/samples/validate/validate.cpp @@ -41,10 +41,10 @@ MyData g_data; bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Validation Test", 50, 50, 300, 250); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Validation Test", 50, 50, 300, 250); // Give it an icon -#ifdef __WINDOWS__ +#ifdef __WXMSW__ frame->SetIcon(wxIcon("mondrian")); #endif #ifdef __X__ @@ -75,29 +75,29 @@ MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) {} -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Close(TRUE); } -void MyFrame::OnTestDialog(wxCommandEvent& event) +void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event)) { - MyDialog dialog(this, "Validation test dialog", wxPoint(100, 100), wxSize(340, 200)); + MyDialog dialog(this, "Validation test dialog", wxPoint(100, 100), wxSize(340, 170)); dialog.ShowModal(); } -MyDialog::MyDialog(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, - const long style): +MyDialog::MyDialog( wxWindow *parent, const wxString& title, + const wxPoint& pos, const wxSize& size, const long WXUNUSED(style) ) : wxDialog(parent, VALIDATE_DIALOG_ID, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) { wxButton *but1 = new wxButton(this, wxID_OK, "OK", wxPoint(250, 10), wxSize(80, 30)); - wxButton *but2 = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(250, 60), wxSize(80, 30)); + (void)new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(250, 60), wxSize(80, 30)); - wxTextCtrl *txt1 = new wxTextCtrl(this, VALIDATE_TEXT, "", - wxPoint(10, 10), wxSize(100, -1), 0, wxTextValidator(wxFILTER_ALPHA, &g_data.m_string)); + (void)new wxTextCtrl(this, VALIDATE_TEXT, "", + wxPoint(10, 10), wxSize(120, -1), 0, wxTextValidator(wxFILTER_ALPHA, &g_data.m_string)); -// SetBackgroundColour(wxColour(0,0,255)); + SetBackgroundColour(wxColour(0,0,255)); but1->SetFocus(); but1->SetDefault();