Export (0) Print
Expand All
Expand Minimize

CMFCToolBar::SetToolBarBtnText

Specifies properties of a button on the toolbar.

void SetToolBarBtnText(
   UINT nBtnIndex,
   LPCTSTR szText=NULL,
   BOOL bShowText=TRUE,
   BOOL bShowImage=TRUE 
);

[in] nBtnIndex

The zero-based index of the toolbar button in the list of toolbar buttons.

[in] szText

Specifies the text label of the toolbar button.

[in] bShowText

If this parameter is TRUE, the framework shows the text label. Otherwise, the framework hides the text label.

[in] bShowImage

If this parameter is TRUE, the framework shows the toolbar button image. Otherwise, the framework hides the toolbar button image.

By default, the framework shows the images of toolbar buttons but does not show the text label of toolbar buttons.

In Debug builds, this method generates an assertion failure if nBtnIndex does not refer to a valid toolbar button or the toolbar button is a separator.

Header: afxtoolbar.h

Community Additions

ADD
Show:
© 2015 Microsoft