X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abee7f4704abec585496b874eb87f5cd5fef45b8..c200f9a3b7003a6ef27f079672b7d165b04a59b7:/samples/docview/docview.cpp diff --git a/samples/docview/docview.cpp b/samples/docview/docview.cpp index 5e0c865bae..b865b6f425 100644 --- a/samples/docview/docview.cpp +++ b/samples/docview/docview.cpp @@ -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