We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

CMFCToolBar::ProcessCommand

Posts a WM_COMMAND message to the window that owns the toolbar.

BOOL ProcessCommand(
   CMFCToolBarButton* pButton
);

[in] pButton

Pointer to a button on the toolbar.

This method should always return TRUE. MFC uses FALSE values internally.

This method posts a WM_COMMAND message to the window that owns the toolbar by calling CWnd::PostMessage and passing the command ID of the specified button as the wParam parameter.

Use the ON_COMMAND macro to map the WM_COMMAND message to a member function.

Header: afxtoolbar.h

Show: