X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/adf07e34d9a29d3187e9ee79c870e04e58e989e9..3a33127542b111cf41a0c7b17d1316ef0855e9fe:/samples/render/render.cpp diff --git a/samples/render/render.cpp b/samples/render/render.cpp index 4586ef580e..782bd03f70 100644 --- a/samples/render/render.cpp +++ b/samples/render/render.cpp @@ -133,8 +133,10 @@ public: dc.DrawText(_T("Below is the standard header button drawn"), 10, 10); dc.DrawText(_T("using the current renderer:"), 10, 40); - wxRendererNative::Get().DrawHeaderButton(this, dc, - wxRect(20, 70, 100, 60)); + wxRendererNative& renderer = wxRendererNative::Get(); + const wxCoord height = renderer.GetHeaderButtonHeight(this); + + renderer.DrawHeaderButton(this, dc, wxRect(20, 70, 100, height)); } DECLARE_EVENT_TABLE() @@ -201,6 +203,9 @@ IMPLEMENT_APP(MyApp) // 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // create the main application window new MyFrame;