X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/256b8649ff5f7f9721878394e7cc5052129d3502..c4e2838090992384911a6a6aa44cac985d79a555:/samples/shaped/shaped.cpp diff --git a/samples/shaped/shaped.cpp b/samples/shaped/shaped.cpp index a79b97abbf..5ade1330a7 100644 --- a/samples/shaped/shaped.cpp +++ b/samples/shaped/shaped.cpp @@ -85,16 +85,16 @@ private: wxBitmap m_bmp; wxPoint m_delta; - // any class wishing to process wxWindows events must use this macro + // any class wishing to process wxWidgets events must use this macro DECLARE_EVENT_TABLE() }; // ---------------------------------------------------------------------------- -// event tables and other macros for wxWindows +// event tables and other macros for wxWidgets // ---------------------------------------------------------------------------- -// the event tables connect the wxWindows events with the functions (event +// the event tables connect the wxWidgets events with the functions (event // handlers) which process them. It can be also done at run-time, but for the // simple menu events like this the static method is much simpler. BEGIN_EVENT_TABLE(ShapedFrame, wxFrame) @@ -112,7 +112,7 @@ BEGIN_EVENT_TABLE(ShapedFrame, wxFrame) END_EVENT_TABLE() -// Create a new application object: this macro will allow wxWindows to create +// Create a new application object: this macro will allow wxWidgets to create // the application object during program execution (it's better than using a // static object for many reasons) and also declares the accessor function // wxGetApp() which will return the reference of the right type (i.e. MyApp and @@ -134,13 +134,13 @@ bool MyApp::OnInit() // Create the main application window ShapedFrame *frame = new ShapedFrame(); - frame->Show(TRUE); + frame->Show(true); SetTopWindow(frame); // success: wxApp::OnRun() will be called which will enter the main message - // loop and the application will run. If we returned FALSE here, the + // loop and the application will run. If we returned false here, the // application would exit immediately. - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -149,7 +149,7 @@ bool MyApp::OnInit() // frame constructor ShapedFrame::ShapedFrame() - : wxFrame((wxFrame *)NULL, -1, wxEmptyString, + : wxFrame((wxFrame *)NULL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(100, 100), //wxDefaultSize, 0 | wxFRAME_SHAPED @@ -158,7 +158,7 @@ ShapedFrame::ShapedFrame() | wxSTAY_ON_TOP ) { - m_hasShape = FALSE; + m_hasShape = false; m_bmp = wxBitmap(_T("star.png"), wxBITMAP_TYPE_PNG); SetSize(wxSize(m_bmp.GetWidth(), m_bmp.GetHeight())); #ifndef __WXMAC__ @@ -188,7 +188,7 @@ void ShapedFrame::OnDoubleClick(wxMouseEvent& WXUNUSED(evt)) { wxRegion region; SetShape(region); - m_hasShape = FALSE; + m_hasShape = false; } else SetWindowShape(); @@ -233,7 +233,7 @@ void ShapedFrame::OnExit(wxMouseEvent& WXUNUSED(evt)) void ShapedFrame::OnPaint(wxPaintEvent& WXUNUSED(evt)) { wxPaintDC dc(this); - dc.DrawBitmap(m_bmp, 0, 0, TRUE); + dc.DrawBitmap(m_bmp, 0, 0, true); } void ShapedFrame::OnWindowCreate(wxWindowCreateEvent& WXUNUSED(evt))