Share via


WM_ Message Handlers: A - C

The following map entries on the left correspond to the function prototypes on the right:

Map entry

Function prototype

ON_WM_ACTIVATE()

afx_msg void OnActivate(UINT, CWnd*, BOOL);

ON_WM_ACTIVATEAPP()

afx_msg void OnActivateApp(BOOL, DWORD);

ON_WM_APPCOMMAND()

afx_msg void OnAppCommand(CWnd*, UINT, UINT, UINT);

ON_WM_ASKCBFORMATNAME()

afx_msg void OnAskCbFormatName(UINT, LPSTR);

ON_WM_CANCELMODE()

afx_msg void OnCancelMode();

ON_WM_CAPTURECHANGED()

afx_msg void OnCaptureChanged(CWnd*);

ON_WM_CHANGECBCHAIN()

afx_msg void OnChangeCbChain(HWND, HWND);

ON_WM_CHAR()

afx_msg void OnChar(UINT, UINT, UINT);

ON_WM_CHARTOITEM()

afx_msg int OnCharToItem(UINT, CWnd*, UINT);

ON_WM_CHILDACTIVATE()

afx_msg void OnChildActivate();

ON_WM_CLIPBOARDUPDATE()

afx_msg void OnClipboardUpdate();

ON_WM_CLOSE()

afx_msg void OnClose();

ON_WM_COMPACTING()

afx_msg void OnCompacting(UINT);

ON_WM_COMPAREITEM()

afx_msg int OnCompareItem(LPCOMPAREITEMSTRUCT);

ON_WM_CONTEXTMENU()

afx_msg void OnContextMenu(CWnd*, CPoint);

ON_WM_COPYDATA()

afx_msg BOOL OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct);

ON_WM_CREATE()

afx_msg int OnCreate(LPCREATESTRUCT);

ON_WM_CTLCOLOR()

afx_msg HBRUSH OnCtlColor(CDC*, CWnd*, UINT);

See Also

Reference

Message Maps (MFC)

Handlers for WM_ Messages