static inline void SendSetRedraw(HWND hwnd, bool on)
{
+#ifndef __WXMICROWIN__
::SendMessage(hwnd, WM_SETREDRAW, (WPARAM)on, 0);
+#endif
}
void wxWindowMSW::Freeze()
#endif // wxUSE_MENUS_NATIVE
wxWindow *win = NULL;
- if ( cmd == 0 || cmd == 1 ) // menu or accel - use id
+
+ // first try to find it from HWND - this works even with the broken
+ // programs using the same ids for different controls
+ if ( control )
{
- // must cast to a signed type before comparing with other ids!
- win = FindItem((signed short)id);
+ win = wxFindWinFromHandle(control);
}
- if ( !win && control )
+ // try the id
+ if ( !win )
{
- // find it from HWND - this works even with the broken programs using
- // the same ids for different controls
- win = wxFindWinFromHandle(control);
+ // must cast to a signed type before comparing with other ids!
+ win = FindItem((signed short)id);
}
if ( win )
// FIXME: this is clearly not the best way to do it but I think we'll
// need to change HWND <-> wxWindow code more heavily than I can
// do it now to fix it
+#ifndef __WXMICROWIN__
if ( ::GetWindow(hwnd, GW_OWNER) )
{
// it's a dialog box, don't go upwards
break;
}
+#endif
hwnd = ::GetParent(hwnd);
win = wxFindWinFromHandle((WXHWND)hwnd);