if ( !wxApp::OnInit() )
return false;
+ ::wxInitAllImageHandlers();
+
SetAppName("DocView Sample");
//// Create a document manager
#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
menu->Append(wxID_CLOSE);
menu->Append(wxID_SAVE);
menu->Append(wxID_SAVEAS);
+ menu->Append(wxID_REVERT, _("Re&vert..."));
if ( supportsPrinting )
{