Message Types Associated with User-Interface Objects

The following table shows the types of objects with which you work, and the types of messages associated with them.

User Interface Objects and Associated Messages

Object ID

Messages

Class name, representing the containing window

Windows messages appropriate to a CWnd-derived class: a dialog box, window, child window, MDI child window, or topmost frame window.

Menu or accelerator identifier

  • COMMAND message (executes the program function).

  • UPDATE_COMMAND_UI message (dynamically updates the menu item).

Control identifier

Control notification messages for the selected control type.

See Also

Tasks

Mapping Messages to Functions

Adding a Member Function

Adding a Member Variable

Overriding a Virtual Function

Reference

Navigating the Class Structure

Concepts

Adding Functionality with Code Wizards

Adding a Class

Adding an MFC Message Handler