Including a Menu in Your Application

Once you have defined a menu in the resource script file, you can include it in your application code. You specify a menu by associating it with a window. Any overlapped or pop-up window can have a menu; a child window cannot (although child windows can have system menus).

There are two common ways to specify a menu in your application:

Specify the menu as the class menu when registering a window class. All windows of that class will then include that menu.

Specify the menu when creating a window. That window will then include that menu.

The following sections explain these two methods.