#include "wx/msw/private.h"
#include "assert.h"
-#if USE_XPM_IN_MSW
+#if wxUSE_XPM_IN_MSW
#define FOR_MSW 1
-#include "..\..\contrib\wxxpm\libxpm.34b\lib\xpm34.h"
+#include "../src/xpm/xpm34.h"
#endif
-#if USE_RESOURCE_LOADING_IN_MSW
+#if wxUSE_RESOURCE_LOADING_IN_MSW
#include "wx/msw/curico.h"
#include "wx/msw/curicop.h"
#endif
bool wxICOFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight)
{
-#if USE_RESOURCE_LOADING_IN_MSW
+#if wxUSE_RESOURCE_LOADING_IN_MSW
if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) )
{
wxIcon *icon = (wxIcon *)bitmap;
M_ICONHANDLERDATA->m_width = 32;
M_ICONHANDLERDATA->m_height = 32;
#endif
+ // Override the found values with desired values
+ if (desiredWidth > -1 && desiredHeight > -1)
+ {
+ M_ICONHANDLERDATA->m_width = desiredWidth;
+ M_ICONHANDLERDATA->m_height = desiredHeight;
+ }
+
M_ICONHANDLERDATA->m_ok = (M_ICONHANDLERDATA->m_hIcon != 0);
return M_ICONHANDLERDATA->m_ok;
}