Minor cleanup and copyright updates in the dialogs sample.

No real changes otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-05 22:53:37 +00:00
parent 87a1867991
commit 5b05ce47a4
2 changed files with 10 additions and 13 deletions

View File

@@ -1,11 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialogs.cpp // Name: dialogs.cpp
// Purpose: Common dialogs demo // Purpose: Common dialogs demo
// Author: Julian Smart // Author: Julian Smart, Vadim Zeitlin, ABX
// Modified by: ABX (2004) - adjustements for conditional building + new menu
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// (c) 2004 ABX
// (c) Vadim Zeitlin
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -274,7 +275,7 @@ bool MyApp::OnInit()
m_canvasFont = *wxNORMAL_FONT; m_canvasFont = *wxNORMAL_FONT;
// Create the main frame window // Create the main frame window
MyFrame *frame = new MyFrame((wxFrame *) NULL, wxT("wxWidgets dialogs example")); MyFrame *frame = new MyFrame(wxT("wxWidgets dialogs example"));
// Make a menubar // Make a menubar
wxMenu *menuDlg = new wxMenu; wxMenu *menuDlg = new wxMenu;
@@ -474,19 +475,14 @@ bool MyApp::OnInit()
frame->SetMenuBar(menubar); frame->SetMenuBar(menubar);
frame->Centre(wxBOTH); frame->Centre(wxBOTH);
// Show the frame
frame->Show(true); frame->Show(true);
SetTopWindow(frame);
return true; return true;
} }
// My frame constructor // My frame constructor
MyFrame::MyFrame(wxWindow *parent, MyFrame::MyFrame(const wxString& title)
const wxString& title) : wxFrame(NULL, wxID_ANY, title)
: wxFrame(parent, wxID_ANY, title)
{ {
SetIcon(sample_xpm); SetIcon(sample_xpm);

View File

@@ -1,11 +1,12 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialogs.h // Name: dialogs.h
// Purpose: Common dialogs demo // Purpose: Common dialogs demo
// Author: Julian Smart // Author: Julian Smart, Vadim Zeitlin, ABX
// Modified by: ABX (2004) - adjustementd for conditional building
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart // Copyright: (c) Julian Smart
// (c) 2004 ABX
// (c) Vadim Zeitlin
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -283,7 +284,7 @@ DECLARE_EVENT_TABLE()
class MyFrame: public wxFrame class MyFrame: public wxFrame
{ {
public: public:
MyFrame(wxWindow *parent, const wxString& title); MyFrame(const wxString& title);
virtual ~MyFrame(); virtual ~MyFrame();
#if wxUSE_MSGDLG #if wxUSE_MSGDLG