#include <string.h>
extern wxList wxModelessWindows;
+extern wxMenu *wxCurrentPopupMenu;
#define IDM_WINDOWTILE 4001
#define IDM_WINDOWCASCADE 4002
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 (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);
}