The Menu class

The Menu class handles a menu, made up of a list of menu items, separator bars, or submenus. When a menu item is added, its command information is stored in the document's command map to be used when receiving the WM_COMMAND and WM_INITCOMMAND messages. If the menu item text includes an accelerator, it is added to the document's accelerator set. The Command class is an auxiliary class holding pointers to the menu items: selection, enable, check, and radio listeners.

Command.h

namespace SmallWindows { typedef void (*VoidListener)(void* sourcePtr); typedef bool (*BoolListener)(void* sourcePtr); class Command { public: Command(); Command(VoidListener selection, BoolListener enable, BoolListener check, BoolListener radio); VoidListener ...

Get C++ Windows Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.