Udostępnij za pośrednictwem


CEdit::ShowBalloonTip

Displays a balloon tip that is associated with the current edit control.

BOOL ShowBalloonTip(
     PEDITBALLOONTIP pEditBalloonTip
);
BOOL ShowBalloonTip(
     LPCWSTR lpszTitle, 
     LPCWSTR lpszText, 
     INT ttiIcon = TTI_NONE
);

Parameters

Parameter

Description

[in] pEditBalloonTip

Pointer to an EDITBALLOONTIP structure that describes the balloon tip.

[in] lpszTitle

Pointer to a Unicode string that contains the title of the balloon tip.

[in] lpszText

Pointer to a Unicode string that contains the balloon tip text.

[in] ttiIcon

An INT that specifies the type of icon to associate with the balloon tip. The default value is TTI_NONE. For more information, see the ttiIcon member of the EDITBALLOONTIP structure.

Return Value

true if this method is successful; otherwise, false.

Remarks

This function sends the EM_SHOWBALLOONTIP message, which is described in the Windows SDK. For more information, see the Edit_ShowBalloonTip macro.

Example

The following code example defines a variable, m_cedit, that is used to access the current edit control. This variable is used in the next example.

public:
    // Variable to access the edit control.
    CEdit m_cedit;

The following code example displays a balloon tip for an edit control. The CEdit::ShowBalloonTip method specifies a title and balloon tip text.

    m_cedit.ShowBalloonTip( 
        _T("CEdit Balloon Tip"),    // title
        _T("Here's a tip!"),        // text
        TTI_INFO);

Requirements

Header: afxwin.h

This control is supported in Windows XP and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

See Also

Reference

CEdit Class

Hierarchy Chart

CEdit::HideBalloonTip

EM_SHOWBALLOONTIP

EDITBALLOONTIP

Edit_ShowBalloonTip

Other Resources

CEdit Members