Partager via


CButton::GetNote

Retrieves the note text associated with the current command link control.

CString GetNote() const;
BOOL GetNote(
     LPTSTR lpszNote, 
     UINT* cchNote
) const;

Parameters

Parameter

Description

[out] lpszNote

Pointer to a buffer, which the caller is responsible for allocating and deallocating. If the return value is true, the buffer contains the note text that is associated with the current command link control; otherwise, the buffer is unchanged.

[in, out] cchNote

A pointer to an unsigned integer variable.

When this method is called, the variable contains the size of the buffer specified by the lpszNote parameter.

When this method returns, if the return value is true the variable contains the size of the note associated with the current command link control. If the return value is false, the variable contains the buffer size required to contain the note.

Return Value

In the first overload, a CString object that contains the note text associated with the current command link control.

-or-

In the second overload, 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_GETNOTE 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.

See Also

Reference

CButton Class

Hierarchy Chart

CButton::SetNote

CButton::GetNoteLength

BCM_GETNOTE

Other Resources

CButton Members