本文由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)
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翻译: