previous | start | next

## Menus

- Each menu item must have an integer ID number, used to match up menu items with their actions.

  >     const int ID_SAY_HELLO = 1000;
  >     const int ID_SAY_GOODBYE = 1001;

- Now construct a menu and append the two menu items to it.

  >     wxMenu* menu = new wxMenu();
  >     menu->Append(ID_SAY_HELLO, "Hello");
  >     menu->Append(ID_SAY_GOODBYE, "Goodbye");

- Finally, constructor a menu bar object, set it as the menu bar of the frame, and append the menu.

  >     wxMenuBar* menu_bar = new wxMenuBar();
  >     SetMenuBar(menu_bar);
  >     menu_bar->Append(menu, "Say);

previous | start | next