CToolTipCtrl::Create

BOOL Create( CWnd* pParentWnd, DWORD dwStyle = 0 );

Return Value

Nonzero if the CToolTipCtrl object is successfully created; otherwise 0.

Parameters

pParentWnd

Specifies the tool tip control’s parent window, usually a CDialog. It must not be NULL.

dwStyle

Specifies the tool tip control’s style. Apply any combination of control styles needed to the control.

Remarks

You construct a CToolTipCtrl in two steps. First call the constructor to construct the CToolTipCtrl object; then call Create to create the tool tip control and attach it to the CToolTipCtrl object.

The dwStyle parameter can be any combination of Window Styles. In addition, a tool tip control has two class-specific styles: TTS_ALWAYSTIP and TTS_NOPREFIX.

Style Meaning
TTS_ALWAYSTIP Specifies that the tool tip will appear when the cursor is on a tool, regardless of whether the tool tip control's owner window is active or inactive. Without this style, the tool tip control appears when the tool's owner window is active, but not when it is inactive.
TTS_NOPREFIX This style prevents the system from stripping the ampersand (&) character from a string. If a tool tip control does not have the TTS_NOPREFIX style, the system automatically strips ampersand characters, allowing an application to use the same string as both a menu item and as text in a tool tip control.

A tool tip control has the WS_POPUP and WS_EX_TOOLWINDOW window styles, regardless of whether you specify them when creating the control.

Example

See the example for CPropertySheet::GetTabControl.

CToolTipCtrl OverviewClass MembersHierarchy Chart

See Also   CToolTipCtrl::CToolTipCtrl