[Win32SDK基本]Button Control(1)Push Button 和 BM_SETIMAGE

本文由CSDN用户zuishikonghuan所作,转载请注明出处:http://blog.csdn.net/zuishikonghuan/article/details/46649211

前两篇中介绍了Static Control,这几篇来介绍一下Button Control

Button Control有很多类型,下图中展示了这一点(图片来自MSDN:https://msdn.microsoft.com/en-us/library/windows/desktop/bb775947(v=vs.85).aspx

这一篇中就介绍一下Push Button

MSDN:

A push button is a rectangle containing an application-defined text label, an icon, or a bitmap that indicates what the buttohe user selects it.

A push button can be one of two styles, standard or default, as defined by the constants BS_PUSHBUTTON and BS_DEFPUSHBUTTON. A standard push button is typically used to start an operation. It receives the keyboard focus when the user clicks it. A default push button is typically used to indicate the most common or default choice, such as closing the dialog box. It is a button that the user can select by simply pressing ENTER when no other push button in the dialog box has the input focus.

When the user clicks a push button, it receives the keyboard focus. The system sends the button's parent window a WM_COMMAND message that contains the BN_CLICKED notification code.

The split button is a special kind of push button introduced in Windows Vista and Version 6.00. A split button is divided into two parts. The main part functions like a regular or default push button. The second part has an arrow pointing downward. Typically a menu is displayed when the arrow is clicked.

A split button has the BS_SPLITBUTTON style, or the BS_DEFSPLITBUTTON style if it is the default button in a dialog box. You can modify the appearance of the button by using the BCM_SETSPLITINFO message or the corresponding Button_SetSplitInfo macro.

When the user clicks on the main part of the split button, it sends a BN_CLICKED notification just like a normal push button. But when the user clicks on the down arrow, it sends a BCN_DROPDOWN notification. It is the application's responsibility to display a menu in response to BCN_DROPDOWN.

Windows Vista and Version 6.00 also introduced another kind of push button, the command link. Visually, a command link is very different from a normal push button, but it has the same functionality. A command link typically displays an arrow icon, a line of text, and additional text in a smaller font.


这里取其中的关键一部分bing翻译:

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值