I am trying to load an Image file of type .xpm into the wxBitmap Object using LoadFile method. The following call fails
wxBitmap aBitmap;
aBitmap.LoadFile(strIconPath,wxBITMAP_TYPE_XPM);
with the error
No image handler for type wxBITMAP_TYPE_XPM defined.
Whereas, if I load it by including the xpm file and using it as shown below, it works.
#include "Icon.xpm"
wxBitmap aBitmap;
aBitmap.CopyFromIcon(wxIcon(Icon_xpm));
What is the problem with the first implementation?