X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bb9a404fbd035652906795c1cd83c743ea9041c..cd15bcaf50ead53ccf9d50965312f0dc754affb4:/samples/xrc/xrcdemo.cpp?ds=sidebyside diff --git a/samples/xrc/xrcdemo.cpp b/samples/xrc/xrcdemo.cpp index e82ea49d99..bc3fcd1793 100644 --- a/samples/xrc/xrcdemo.cpp +++ b/samples/xrc/xrcdemo.cpp @@ -38,6 +38,10 @@ #include "wx/xrc/xmlres.h" // XRC XML resources +#if wxUSE_RIBBON + #include "wx/xrc/xh_ribbon.h" +#endif // wxUSE_RIBBON + #include "wx/cshelp.h" // wxSimpleHelpProvider for helptext #include "myframe.h" @@ -64,10 +68,11 @@ bool MyApp::OnInit() return false; // If there is any of a certain format of image in the xrcs, then first - // load a handler for that image type. This example uses XPMs, but if - // you want PNGs, then add a PNG handler, etc. See wxImage::AddHandler() + // load a handler for that image type. This example uses XPMs & a gif, but + // if you want PNGs, then add a PNG handler, etc. See wxImage::AddHandler() // documentation for the types of image handlers available. wxImage::AddHandler(new wxXPMHandler); + wxImage::AddHandler(new wxGIFHandler); // Initialize all the XRC handlers. Always required (unless you feel like // going through and initializing a handler of each control type you will @@ -77,6 +82,10 @@ bool MyApp::OnInit() // wxXRC docs for details. wxXmlResource::Get()->InitAllHandlers(); +#if wxUSE_RIBBON + wxXmlResource::Get()->AddHandler(new wxRibbonXmlHandler); +#endif + // Load all of the XRC files that will be used. You can put everything // into one giant XRC file if you wanted, but then they become more // diffcult to manage, and harder to reuse in later projects.