Author Topic: How do I make wxMenuBar respond to events?  (Read 3675 times)

Offline Greatwolf

  • Multiple posting newcomer
  • *
  • Posts: 48
How do I make wxMenuBar respond to events?
« on: August 13, 2010, 02:44:51 am »
Taking a simple example, say I have wxMenuBar in my frame. wxMenuBar only has one wxMenu let say Exit. The wxMenu itself is empty -- that is to say it contains no drop down menu items. Now when the user clicks on the Exit on the menubar it should call some eventhandler function(that presumably closes the program etc.). How do I do that?

Thanks

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How do I make wxMenuBar respond to events?
« Reply #1 on: August 13, 2010, 06:55:17 am »
Create a wxwidgets sample with the wizard, add amneu and add an eventhandler to it, to see how it can be done.
Or read one of the wxWidgets samples (don't ask me which is the right one).
Or read the wxWidgets book, it's free for download from http://www.informit.com/promotions/promotion.aspx?promo=135563 (there are several other interesting and free books on this side).
Direct link: http://www.phptr.com/content/images/0131473816/downloads/0131473816_book.pdf

Or ask in the wxWidgets forum.

But this forum/site is definitely the wrong place.
Only C::B related questions are allowed here, so your question violates our forum rules.

Topic locked !!