如何设置ToolBar中Button的风格???

byry 2003-11-19 02:15:33
希望将Button设置为BS_AUTOCHECKBOX风格
...全文
50 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
photomm 2003-11-21
  • 打赏
  • 举报
回复
得到m_wndDlgBar的指针,在得到DLG上BUTTON的指针,使用SetButtonStyle
byry 2003-11-19
  • 打赏
  • 举报
回复
我上面说错了,不是在工具栏是CDialogBar m_wndDlgBar,请问怎样设置能使之象CToolBar m_wndToolBar的风格???
byry 2003-11-19
  • 打赏
  • 举报
回复
这是哪个控件的member function ?
wuxfBrave 2003-11-19
  • 打赏
  • 举报
回复
Call this member function to set the button's command ID, style, and image number.

void SetButtonInfo(
int nIndex,
UINT nID,
UINT nStyle,
int iImage
);
Parameters
nIndex
Index of the button or separator whose information is to be set.
nID
The value to which the button's command ID is set.
nStyle
The new button style. The following button styles are supported:
TBBS_BUTTON Standard pushbutton (default)
TBBS_SEPARATOR Separator
TBBS_CHECKBOX Auto check-box button
TBBS_GROUP Marks the start of a group of buttons
TBBS_CHECKGROUP Marks the start of a group of check-box buttons
TBBS_DROPDOWN Creates a drop-down list button.
TBBS_AUTOSIZE The button's width will be calculated based on the text of the button, not on the size of the image.
TBBS_NOPREFIX The button text will not have an accelerator prefix associated with it.
iImage
New index for the button's image within the bitmap.

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧