]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/docview/docview.cpp
Support using GetTextExtent() with empty string to get descent in wxOSX.
[wxWidgets.git] / samples / docview / docview.cpp
index 7c305d7e57d2b7d3de6b9532cd9ca066f47ec752..c8d4adcf7368e737efbdcbae27e2f1e24bc85836 100644 (file)
@@ -385,8 +385,14 @@ void MyApp::OnAbout(wxCommandEvent& WXUNUSED(event))
         default:
             wxFAIL_MSG( "unknown mode ");
     }
-    const wxDocVector
-      docList = wxDocManager::GetDocumentManager()->GetDocumentsVector();
+
+#ifdef __VISUALC6__
+    const int docsCount =
+        wxDocManager::GetDocumentManager()->GetDocuments().GetCount();
+#else
+    const int docsCount =
+        wxDocManager::GetDocumentManager()->GetDocumentsVector().size();
+#endif
 
     wxLogMessage
     (
@@ -398,6 +404,6 @@ void MyApp::OnAbout(wxCommandEvent& WXUNUSED(event))
         "\n"
         "Usage: docview [--{mdi,sdi,single}]",
         modeName,
-        static_cast<int>(docList.size())
+        docsCount
     );
 }