wxMenuBar and Events on Mac

Brian Ray bray at sent.com
Mon Oct 2 09:55:17 PDT 2006


On Oct 2, 2006, at 10:54 AM, Brian Ray wrote:

>
> I have a modeless dialog where I am not using a menu. Most menu  
> commands are not being intercepted by the modeless frame. However,  
> others, namely the Quit command, are being  intercepted. How do I  
> get this frame to not handle this event?


I found, If I do something like this:

class wxNoneApp : public wxApp
{
public:
    virtual bool OnInit() { return true; }

   void OnExitFromMenu(wxMenuEvent& event);

   DECLARE_EVENT_TABLE()
};

IMPLEMENT_APP_NO_MAIN( wxNoneApp )

BEGIN_EVENT_TABLE(wxNoneApp, wxApp )
   EVT_MENU(wxID_EXIT, wxNoneApp::OnExitFromMenu)
END_EVENT_TABLE()

void
wxNoneApp::OnExitFromMenu(wxMenuEvent& event)
{

   event.Skip();
}

I am able to get to OnExitFromMenu. However, I do not know how to  
aggregate this command to the parent application. Should this me a wx  
call or an OS call?

tia,

Brian Ray
http://kazavoo.com





More information about the wx-users mailing list