Click to open or copy the files for the Menu sample.
This sample demonstrates the use of popup menus, user-defined menus and menu functions.
Function | Description |
WinMain | Calls the initialization function and enters the message loop. |
MenuInit | Registers the app. window class. |
About | Contains dialog function for the About dialog box. |
ShrinkBitmap | Shrinks a 64x64 bitmap to a size useable for a user-defined menu checkmark. |
HandleCreate | Creates a new menu and appends it to the main menu. |
HandlePaint | Handles repainting the app's client area. |
HandleChangeColors | Changes the state of the Colors menu item. |
HandleDrawItem | Redraws the menu items in the Colors menu. |
HandlePopupMenu | Handles display of the Floating popup. |
MenuWndProc | Window function for the app. |
This sample uses the following keywords:
defwindowproc; destroymenu; enddialog; endpaint; handlechangecolors; handledrawitem; localalloc; locallock; long2point; menuinit; menuwndproc; messagebox; modifymenu; unreferenced_parameter; winmain