From 85401ffe5ca3a1007eb39524a6d14d854310eb44 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Feb 2000 01:55:54 +0000 Subject: [PATCH] cosemtic fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/statbar/statbar.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/samples/statbar/statbar.cpp b/samples/statbar/statbar.cpp index dc3e41156d..ca2cfcda3e 100644 --- a/samples/statbar/statbar.cpp +++ b/samples/statbar/statbar.cpp @@ -39,7 +39,6 @@ #include "wx/app.h" #include "wx/frame.h" #include "wx/statusbr.h" - #include "wx/datetime.h" #include "wx/timer.h" #include "wx/checkbox.h" #include "wx/statbmp.h" @@ -47,6 +46,8 @@ #include "wx/msgdlg.h" #endif +#include "wx/datetime.h" + // ---------------------------------------------------------------------------- // resources // ---------------------------------------------------------------------------- @@ -315,6 +316,11 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) // MyStatusBar // ---------------------------------------------------------------------------- +#ifdef __VISUALC__ + // 'this' : used in base member initializer list -- so what?? + #pragma warning(disable: 4355) +#endif + MyStatusBar::MyStatusBar(wxWindow *parent) : wxStatusBar(parent, -1), m_timer(this) { @@ -326,13 +332,19 @@ MyStatusBar::MyStatusBar(wxWindow *parent) m_checkbox = new wxCheckBox(this, StatusBar_Checkbox, _T("&Toggle clock")); m_checkbox->SetValue(TRUE); - m_statbmp = new wxStaticBitmap(this, -1, wxICON(green)); + m_statbmp = new wxStaticBitmap(this, -1, wxIcon(green_xpm)); m_timer.Start(1000); + SetMinHeight(BITMAP_SIZE_Y); + UpdateClock(); } +#ifdef __VISUALC__ + #pragma warning(default: 4355) +#endif + MyStatusBar::~MyStatusBar() { if ( m_timer.IsRunning() ) @@ -361,7 +373,7 @@ void MyStatusBar::OnToggleClock(wxCommandEvent& event) { m_timer.Start(1000); - m_statbmp->SetIcon(wxICON(green)); + m_statbmp->SetIcon(wxIcon(green_xpm)); UpdateClock(); } @@ -369,7 +381,7 @@ void MyStatusBar::OnToggleClock(wxCommandEvent& event) { m_timer.Stop(); - m_statbmp->SetIcon(wxICON(red)); + m_statbmp->SetIcon(wxIcon(red_xpm)); SetStatusText("", Field_Clock); } -- 2.45.2