]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/display/display.cpp
generate #line references to source .xrc files in wxrc --gettext (patch #1803492...
[wxWidgets.git] / samples / display / display.cpp
index ff358cd01a6baf85a4d6e5965812f71ceb3d9dda..683cb0375e4c7d05e565f0cbc8db964364f0f8ef 100644 (file)
@@ -167,6 +167,9 @@ IMPLEMENT_APP(MyApp)
 // 'Main program' equivalent: the program execution "starts" here
 bool MyApp::OnInit()
 {
+    if ( !wxApp::OnInit() )
+        return false;
+
 #ifdef __WXMSW__
     if ( argc == 2 && !wxStricmp(argv[1],  _T("/dx")) )
     {
@@ -260,6 +263,15 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
                                          r.width, r.height)
                        ));
 
+        const wxRect rc(display.GetClientArea());
+        sizer->Add(new wxStaticText(page, wxID_ANY, _T("Client area: ")));
+        sizer->Add(new wxStaticText
+                       (
+                        page,
+                        wxID_ANY,
+                        wxString::Format(_T("(%d, %d)-(%d, %d)"),
+                                         rc.x, rc.y, rc.width, rc.height)
+                       ));
 
         sizer->Add(new wxStaticText(page, wxID_ANY, _T("Name: ")));
         sizer->Add(new wxStaticText(page, wxID_ANY, display.GetName()));