Partager via


CMFCToolBar::IsLastCommandFromButton

Determines whether the most recently executed command was sent from the specified toolbar button.

static BOOL IsLastCommandFromButton(
   CMFCToolBarButton* pButton 
);

Parameters

  • [in] pButton
    Pointer to button.

Return Value

TRUE if the last command was sent from the button that pButton specifies; otherwise FALSE.

Remarks

This method obtains a pointer to a MSG Structure by calling CWnd::GetCurrentMessage. It then compares the HWND of the button with the MSG::lParam and MSG::hwnd members to determine whether the button was the source of the command.

Requirements

Header: afxtoolbar.h

See Also

Reference

CMFCToolBar Class

Hierarchy Chart