]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/forty/forty.cpp
add VC9 project files (closes #9960)
[wxWidgets.git] / demos / forty / forty.cpp
index 5e3525e256313e0fe834eafe969efc08b711d7bf..24902505bb0ad9d3b105a5cc884a7377a9042050 100644 (file)
@@ -26,6 +26,7 @@
 #include "forty.h"
 #include "card.h"
 #include "scoredg.h"
+#include "forty.xpm"
 
 #if wxUSE_HTML
 #include "wx/textfile.h"
@@ -141,9 +142,7 @@ FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos
 #ifdef __WXMSW__
     SetIcon(wxIcon(_T("CardsIcon")));
 #else
-#ifdef GTK_TBD
-    SetIcon(wxIcon(Cards_bits, Cards_width, Cards_height));
-#endif
+    SetIcon(wxIcon(forty_xpm));
 #endif
 
     // Make a menu bar
@@ -196,11 +195,12 @@ FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos
     wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
     topsizer->Add( m_canvas, 1, wxEXPAND | wxALL, 0);
     SetSizer( topsizer );
-    topsizer->SetSizeHints( this );
 
 #if wxUSE_STATUSBAR
     CreateStatusBar();
 #endif // wxUSE_STATUSBAR
+
+    topsizer->SetSizeHints( this );
 }
 
 void FortyFrame::OnCloseWindow(wxCloseEvent& event)
@@ -304,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 )
@@ -367,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 );
 
@@ -378,4 +375,3 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
 
     return true;
 }
-