always call SetIcon() on the main frame of the sample; some small cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-02-08 01:01:00 +00:00
parent 27721528c4
commit 41f02b9acc
21 changed files with 435 additions and 304 deletions

View File

@@ -24,10 +24,17 @@
#error Sorry, this sample is only appropriate under Windows.
#endif
#ifndef __WXMSW__
#include "../sample.xpm"
#endif
#include <ctype.h>
#include "nativdlg.h"
#include "resource.h"
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit(void)
@@ -75,7 +82,9 @@ END_EVENT_TABLE()
MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size):
wxFrame(parent, id, title, pos, size)
{
panel = NULL;
SetIcon(wxICON(sample));
panel = NULL;
}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
@@ -104,10 +113,10 @@ END_EVENT_TABLE()
void MyDialog::OnOk(wxCommandEvent& WXUNUSED(event))
{
EndModal(wxID_OK);
EndModal(wxID_OK);
}
void MyDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
{
EndModal(wxID_CANCEL);
EndModal(wxID_CANCEL);
}