Processing Tab Control Notification Messages

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Processing Tab Control Notification Messages.

As users click tabs or buttons, the tab control (CTabCtrl) sends notification messages to its parent window. Handle these messages if you want to do something in response. For example, when the user clicks a tab, you may want to preset control data on the page prior to displaying it.

Process WM_NOTIFY messages from the tab control in your view or dialog class. Use the Properties window to create an OnChildNotify handler function with a switch statement based on which notification message is being handled. For a list of the notifications a tab control can send to its parent window, see the Notifications section of Tab Control Reference in the Windows SDK.

See Also

Using CTabCtrl
Controls