///////////////////////////////////////////////////////////////////////////////
-// Name: msw/popupwin.cpp
+// Name: src/msw/popupwin.cpp
// Purpose: implements wxPopupWindow for MSW
// Author: Vadim Zeitlin
// Modified by:
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "popup.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
+#if wxUSE_POPUPWIN
+
#ifndef WX_PRECOMP
-#include "wx/defs.h"
#endif //WX_PRECOMP
-#if wxUSE_POPUPWIN
-
#include "wx/popupwin.h"
#include "wx/msw/private.h" // for GetDesktopWindow()
-IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
-
// ============================================================================
// implementation
// ============================================================================
{
wxLogLastError(_T("SetWindowPos"));
}
+
+ // and set it as the foreground window so the mouse can be captured
+ ::SetForegroundWindow(GetHwnd());
}
return true;
}
#endif // #if wxUSE_POPUPWIN
-