Fixed popup menu processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
54ff4a701f
commit
e1a6fc11e2
@ -47,6 +47,7 @@
|
|||||||
extern wxList wxModelessWindows;
|
extern wxList wxModelessWindows;
|
||||||
extern wxList wxPendingDelete;
|
extern wxList wxPendingDelete;
|
||||||
extern char wxFrameClassName[];
|
extern char wxFrameClassName[];
|
||||||
|
extern wxMenu *wxCurrentPopupMenu;
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
BEGIN_EVENT_TABLE(wxFrame, wxWindow)
|
BEGIN_EVENT_TABLE(wxFrame, wxWindow)
|
||||||
@ -735,6 +736,14 @@ bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
|||||||
if (win)
|
if (win)
|
||||||
return win->MSWCommand(cmd, id);
|
return win->MSWCommand(cmd, id);
|
||||||
|
|
||||||
|
if (wxCurrentPopupMenu)
|
||||||
|
{
|
||||||
|
wxMenu *popupMenu = wxCurrentPopupMenu;
|
||||||
|
wxCurrentPopupMenu = NULL;
|
||||||
|
if (popupMenu->MSWCommand(cmd, id))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (GetMenuBar() && GetMenuBar()->FindItemForId(id))
|
if (GetMenuBar() && GetMenuBar()->FindItemForId(id))
|
||||||
{
|
{
|
||||||
ProcessCommand(id);
|
ProcessCommand(id);
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
extern wxList wxModelessWindows;
|
extern wxList wxModelessWindows;
|
||||||
|
extern wxMenu *wxCurrentPopupMenu;
|
||||||
|
|
||||||
#define IDM_WINDOWTILE 4001
|
#define IDM_WINDOWTILE 4001
|
||||||
#define IDM_WINDOWCASCADE 4002
|
#define IDM_WINDOWCASCADE 4002
|
||||||
@ -486,6 +487,14 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
|||||||
if (win)
|
if (win)
|
||||||
return win->MSWCommand(cmd, id);
|
return win->MSWCommand(cmd, id);
|
||||||
|
|
||||||
|
if (wxCurrentPopupMenu)
|
||||||
|
{
|
||||||
|
wxMenu *popupMenu = wxCurrentPopupMenu;
|
||||||
|
wxCurrentPopupMenu = NULL;
|
||||||
|
if (!popupMenu->MSWCommand(cmd, id))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case IDM_WINDOWCASCADE:
|
case IDM_WINDOWCASCADE:
|
||||||
@ -937,6 +946,14 @@ bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
|||||||
if (win)
|
if (win)
|
||||||
return win->MSWCommand(cmd, id);
|
return win->MSWCommand(cmd, id);
|
||||||
|
|
||||||
|
if (wxCurrentPopupMenu)
|
||||||
|
{
|
||||||
|
wxMenu *popupMenu = wxCurrentPopupMenu;
|
||||||
|
wxCurrentPopupMenu = NULL;
|
||||||
|
if (popupMenu->MSWCommand(cmd, id))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (GetMenuBar() && GetMenuBar()->FindItemForId(id))
|
if (GetMenuBar() && GetMenuBar()->FindItemForId(id))
|
||||||
{
|
{
|
||||||
ProcessCommand(id);
|
ProcessCommand(id);
|
||||||
|
@ -105,7 +105,7 @@ bool wxToolBar95::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, co
|
|||||||
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
GetGValue(GetSysColor(COLOR_BTNFACE)), GetBValue(GetSysColor(COLOR_BTNFACE)));
|
||||||
|
|
||||||
if (style & wxTB_VERTICAL)
|
if (style & wxTB_VERTICAL)
|
||||||
wxMessageBox("Sorry, wxToolBar95 under Windows 95 only supports vertical tiling.", "wxToolBar95 usage", wxOK);
|
wxMessageBox("Sorry, wxToolBar95 under Windows 95 only supports horizontal orientation.", "wxToolBar95 usage", wxOK);
|
||||||
m_maxWidth = -1;
|
m_maxWidth = -1;
|
||||||
m_maxHeight = -1;
|
m_maxHeight = -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user