]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/forty/forty.cpp
Patch from Bo for new API, various fixes, live update for column header
[wxWidgets.git] / demos / forty / forty.cpp
index b981aa9774628a0f995e2b77368c496bcaa90cb4..350889ce4a047e0835ebc1d690b74192bbc5cfb3 100644 (file)
 // Last modified: 22nd July 1998 - ported to wxWidgets 2.0
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation
-#pragma interface
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -129,7 +124,7 @@ const wxColour& FortyApp::TextColour()
 {
     if (!m_textColour)
     {
-        m_textColour = new wxColour(_T("BLACK"));
+        m_textColour = new wxColour(*wxBLACK);
     }
 
     return *m_textColour;
@@ -309,10 +304,6 @@ FortyFrame::ToggleCardSize(wxCommandEvent& event)
 // stAboutDialog
 //----------------------------------------------------------------------------
 
-BEGIN_EVENT_TABLE(FortyAboutDialog,wxDialog)
-    EVT_BUTTON(wxID_CLOSE, wxDialog::OnOK)
-END_EVENT_TABLE()
-
 FortyAboutDialog::FortyAboutDialog( wxWindow *parent, wxWindowID id, const wxString &title,
     const wxPoint &position, const wxSize& size, long style ) :
     wxDialog( parent, id, title, position, size, style )
@@ -372,6 +363,7 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
     wxButton *item2 = new wxButton( parent, wxID_CLOSE );
     item2->SetDefault();
     item2->SetFocus();
+    SetAffirmativeId(wxID_CLOSE);
 
     item0->Add( item2, 0, wxALIGN_RIGHT|wxALL, 5 );
 
@@ -383,4 +375,3 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
 
     return true;
 }
-