From 3654a12d6addaf0d3598ea045c4ebebce46ba07d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 14 Aug 2017 01:23:08 +0200 Subject: [PATCH] Fix xrc sample build with wxUSE_GIF==0 Also check for wxUSE_XPM for consistency. --- samples/xrc/xrcdemo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/xrc/xrcdemo.cpp b/samples/xrc/xrcdemo.cpp index b1c2852c8c..61d4d71d50 100644 --- a/samples/xrc/xrcdemo.cpp +++ b/samples/xrc/xrcdemo.cpp @@ -75,8 +75,12 @@ bool MyApp::OnInit() // 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. +#if wxUSE_XPM wxImage::AddHandler(new wxXPMHandler); +#endif +#if wxUSE_GIF wxImage::AddHandler(new wxGIFHandler); +#endif // Initialize all the XRC handlers. Always required (unless you feel like // going through and initializing a handler of each control type you will