CCommandEvent Class
class CCommandEvent: public CWinEventBase
This class encapsulates a Windows command event. A command event contains a command identifier, a notification code, and possibly a handle to the control the generated the event. The WORD parameter contains the command ID and notification code. The control handle is stored in the LONG parameter.Defined in: CommandEvent.h
Class Members
inline CCommandEvent(UINT nCommandID, int nNotifyCode, HWND hCtl = 0)
Construct a command event from a command ID, notify code, and control handle.
inline virtual bool Dispatch(IQueryGuid* pIListener)
Dispatches the event to the given event listener.
inline virtual UINT GetCommandID() const
Return the command ID.
inline virtual int GetNotifyCode() const
Return the notify code.
inline virtual HWND GetControlHandle() const
Return the control handle.
inline virtual void SetCommandID(const UINT nCommandID)
Set the command ID.
inline virtual void SetNotifyCode(const int nNotifyCode)
Set the notify code.
inline virtual void SetControlHandle(HWND hCtl)
Set the control handle.