#include "wx/mdi.h"
#include "wx/msw/private.h"
-#if USE_NATIVE_STATUSBAR
+#if wxUSE_NATIVE_STATUSBAR
#include <wx/msw/statbr95.h>
#endif
#include <string.h>
extern wxList wxModelessWindows;
+extern wxMenu *wxCurrentPopupMenu;
#define IDM_WINDOWTILE 4001
#define IDM_WINDOWCASCADE 4002
void wxMDIParentFrame::OnSize(wxSizeEvent& event)
{
-#if USE_CONSTRAINTS
+#if wxUSE_CONSTRAINTS
if (GetAutoLayout())
Layout();
#endif
/* Already done in MSWOnSize
// forward WM_SIZE to status bar control
-#if USE_NATIVE_STATUSBAR
+#if wxUSE_NATIVE_STATUSBAR
if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95)))
((wxStatusBar95 *)m_frameStatusBar)->OnSize(event);
#endif
GetEventHandler()->ProcessEvent(event);
#else
-#if USE_CONSTRAINTS
+#if wxUSE_CONSTRAINTS
if (GetAutoLayout())
Layout();
#endif
if (!m_iconized)
{
// forward WM_SIZE to status bar control
-#if USE_NATIVE_STATUSBAR
+#if wxUSE_NATIVE_STATUSBAR
if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95)))
{
wxSizeEvent event(wxSize(x, y), m_frameStatusBar->GetId());
if (win)
return win->MSWCommand(cmd, id);
+/*
+ if (wxCurrentPopupMenu)
+ {
+ wxMenu *popupMenu = wxCurrentPopupMenu;
+ wxCurrentPopupMenu = NULL;
+ if (!popupMenu->MSWCommand(cmd, id))
+ return TRUE;
+ }
+*/
+
switch (id)
{
case IDM_WINDOWCASCADE:
if (!m_iconized)
{
// forward WM_SIZE to status bar control
-#if USE_NATIVE_STATUSBAR
+#if wxUSE_NATIVE_STATUSBAR
if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95)))
{
wxSizeEvent event(wxSize(x, y), m_frameStatusBar->GetId());
if (win)
return win->MSWCommand(cmd, id);
+ if (wxCurrentPopupMenu)
+ {
+ wxMenu *popupMenu = wxCurrentPopupMenu;
+ wxCurrentPopupMenu = NULL;
+ if (popupMenu->MSWCommand(cmd, id))
+ return TRUE;
+ }
+
if (GetMenuBar() && GetMenuBar()->FindItemForId(id))
{
ProcessCommand(id);
long wxMDIClientWindow::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
if ( MSWGetOldWndProc() != 0)
- return ::CallWindowProc(CASTWNDPROC (FARPROC) MSWGetOldWndProc(), (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
+ return ::CallWindowProc(CASTWNDPROC MSWGetOldWndProc(), (HWND) GetHWND(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
else
return ::DefWindowProc((HWND) m_hWnd, (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
}