Fix xrc sample build with wxUSE_GIF==0

Also check for wxUSE_XPM for consistency.
This commit is contained in:
Vadim Zeitlin
2017-08-14 01:23:08 +02:00
parent b6e4bdce3d
commit 3654a12d6a

View File

@@ -75,8 +75,12 @@ bool MyApp::OnInit()
// load a handler for that image type. This example uses XPMs & a gif, but // 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() // if you want PNGs, then add a PNG handler, etc. See wxImage::AddHandler()
// documentation for the types of image handlers available. // documentation for the types of image handlers available.
#if wxUSE_XPM
wxImage::AddHandler(new wxXPMHandler); wxImage::AddHandler(new wxXPMHandler);
#endif
#if wxUSE_GIF
wxImage::AddHandler(new wxGIFHandler); wxImage::AddHandler(new wxGIFHandler);
#endif
// Initialize all the XRC handlers. Always required (unless you feel like // Initialize all the XRC handlers. Always required (unless you feel like
// going through and initializing a handler of each control type you will // going through and initializing a handler of each control type you will