Partilhar via


Processing Notification Messages in List Controls

As users click column headers, drag icons, edit labels, and so on, the list control (CListCtrl) 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 column header, you might want to sort the items based on the contents of the clicked column, as in Microsoft Outlook.

Process WM_NOTIFY messages from the list 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 list control can send to its parent window, see List View Control Reference in the Windows SDK.

See Also

Reference

Using CListCtrl

Concepts

Controls (MFC)