共用方式為


CButton::SetNote

Sets the note text for the current command link control.

BOOL SetNote(
     LPCTSTR lpszNote
);

Parameters

Parameter

Description

[in] lpszNote

Pointer to a Unicode string that is set as the note text for the command link control.

Return Value

true if this method is successful; otherwise, false.

Remarks

Use this method only with controls whose button style is BS_COMMANDLINK or BS_DEFCOMMANDLINK.

This method sends the BCM_SETNOTE message, which is described in the Windows SDK.

Requirements

Header: afxwin.h

This method is supported in Windows Vista and later.

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

Example

The following code example defines the variable, m_cmdLink, that is used to programmatically access the command link control. This variable is used in the following example.

public:
    // Variable to access programatically defined command link control.
    CButton m_cmdLink;
    // Variable to access programatically defined split button control. 
    CButton m_splitButton;

The following code example sets the note text for the command link control.

// Set the command link text.
    m_cmdLink.SetNote(_T("This is the command link note."));

See Also

Reference

CButton Class

Hierarchy Chart

CButton::GetNote

CButton::GetNoteLength

BCM_SETNOTE