#ifdef WX_PRECOMP
// include standard Windows headers
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !wxUSE_MFC
#include <windows.h>
#include "wx/msw/winundef.h"
#endif
// include the most common wx headers
#include "wx/wx.h"
-#endif // WX_PRECOMP
\ No newline at end of file
+#endif // WX_PRECOMP