Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.72 KB

mapping-messages-to-functions.md

File metadata and controls

32 lines (24 loc) · 1.72 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Mapping Messages to Functions
Mapping Messages to Functions
09/06/2019
vc.codewiz.mapping.msg.function
Windows messages [MFC], adding message handlers
message maps [MFC], mapping messages to functions
a7727a62-f638-4b20-b7f5-131f47200d6a

Mapping Messages to Functions

The Class Wizard enables you to bind message handlers (member functions of MFC user-interface classes) to the messages generated by your application's resources. They use MFC message maps to create the binding.

When you use Class View to create a new class derived from one of the framework classes, it automatically places a complete and functional class in the header (.h) and implementation (.cpp) files that you specify.

Note

To add a new class that does not handle messages, create the class directly in the text editor.

To define or remove a message handler using the Class Wizard

  1. In Class View, right-click the class.

  2. In the context menu, choose Class Wizard.

See also

MFC Message Handler
Adding Functionality with Code Wizards
Adding a Class
Adding a Member Function
Adding a Member Variable
Overriding a Virtual Function
Navigating the Class Structure