#define _WIN32_IE 0x0200
#endif
-#if _WIN32_IE >= 0x0300 \
- && !( defined(__MINGW32__) && !wxCHECK_W32API_VERSION( 1, 0 ) )
+#if _WIN32_IE >= 0x0300 && !defined(__MINGW32__)
#include <shlwapi.h>
#endif
// we need to find the dialog containing this control as
// IsDialogMessage() just eats all the messages (i.e. returns TRUE for
// them) if we call it for the control itself
- while ( ::GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD )
+ while ( hwnd && ::GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD )
{
hwnd = ::GetParent(hwnd);
}
- return ::IsDialogMessage(hwnd, msg) != 0;
+ return hwnd && ::IsDialogMessage(hwnd, msg) != 0;
}
#if wxUSE_TOOLTIPS