MSWDetachWindowMenu();
+#ifndef __WXUNIVERSAL__
// VS: make sure there's no wxFrame with last focus set to us:
- for (wxWindow *win = GetParent(); win; win = win->GetParent())
+ for ( wxWindow *win = GetParent(); win; win = win->GetParent() )
{
wxFrame *frame = wxDynamicCast(win, wxFrame);
if ( frame )
{
if ( frame->GetLastFocus() == this )
+ {
frame->SetLastFocus((wxWindow*)NULL);
+ }
break;
}
}
+#endif // __WXUNIVERSAL__
// VS: destroy children first and _then_ detach *this from its parent.
// If we'd do it the other way around, children wouldn't be able
// popup menu
// ---------------------------------------------------------------------------
+#if wxUSE_MENUS_NATIVE
+
// yield for WM_COMMAND events only, i.e. process all WM_COMMANDs in the queue
// immediately, without waiting for the next event loop iteration
//
}
}
-#if wxUSE_MENUS_NATIVE
-
bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
{
menu->SetInvokingWindow(this);
if ( !m_hWnd )
{
- wxLogError(_("Can't create window of class %s!\nPossible Windows 3.x compatibility problem?"),
- wclass);
+ wxLogSysError(_("Can't create window of class %s"), wclass);
return FALSE;
}
// create the key event of the given type for the given key - used by
// HandleChar and HandleKeyDown/Up
wxKeyEvent wxWindowMSW::CreateKeyEvent(wxEventType evType,
- int id,
- WXLPARAM lParam) const
+ int id,
+ WXLPARAM lParam) const
{
wxKeyEvent event(evType);
event.SetId(GetId());