Share via


CHotKeyCtrl::Create

Creates a hot key control and attaches it to a CHotKeyCtrl object.

virtual BOOL Create( 
   DWORD dwStyle, 
   const RECT& rect, 
   CWnd* pParentWnd, 
   UINT nID  
);

Parameters

  • dwStyle
    Specifies the hot key control's style. Apply any combination of control styles. See Common Control Styles in the Windows SDK for more information.

  • rect
    Specifies the hot key control's size and position. It can be either a CRect object or a RECT structure.

  • pParentWnd
    Specifies the hot key control's parent window, usually a CDialog. It must not be NULL.

  • nID
    Specifies the hot key control's ID.

Return Value

Nonzero, if initialization was successful; otherwise 0.

Remarks

You construct a CHotKeyCtrl object in two steps. First, call the constructor and then call Create, which creates the hot key control and attaches it to the CHotKeyCtrl object.

If you want to use extended windows styles with your control, call CreateEx instead of Create.

Requirements

Header: afxcmn.h

See Also

Reference

CHotKeyCtrl Class

Hierarchy Chart

CHotKeyCtrl::CHotKeyCtrl