Applied #10811: Image in docview sample

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2009-09-24 16:04:06 +00:00
parent abee7f4704
commit f37f49b652
5 changed files with 239 additions and 1 deletions

View File

@@ -148,6 +148,8 @@ bool MyApp::OnInit()
if ( !wxApp::OnInit() )
return false;
::wxInitAllImageHandlers();
SetAppName("DocView Sample");
//// Create a document manager
@@ -176,6 +178,10 @@ bool MyApp::OnInit()
#if defined( __WXMAC__ ) && wxOSX_USE_CARBON
wxFileName::MacRegisterDefaultTypeAndCreator("txt" , 'TEXT' , 'WXMA');
#endif
// Create a template relating image documents to their views
new wxDocTemplate(docManager, "Image", "*.png;*.jpg", "", "png;jpg",
"Image Doc", "Image View",
CLASSINFO(wxImageDocument), CLASSINFO(wxImageView));
}
// create the main frame window