Drop-down buttons support multiple commands. When the user clicks a drop-down button, the button displays a pop-up menu instead of launching a command. The user launches a command by selecting it from the menu. The following screen shot shows a drop-down button and menu from the Internet Explorer standard toolbar.
Drop-down functionality can be added to any button style by adding a style flag to the fStyle member of the button's TBBUTTON structure. There are three styles of drop-down button, all of which are used by Internet Explorer:
Plain drop-down buttons have the BTNS_DROPDOWN style. They look like normal buttons, but they display a menu when clicked instead of launching a command.
Simple drop-down arrow buttons have the BTNS_WHOLEDROPDOWN style. They have an arrow displayed next to the button image or text. Other than the difference in appearance, they are identical to plain drop-down buttons. The Mail button used as the example in the preceding illustration is a drop-down arrow button.
Drop-down arrow buttons that add the TBSTYLE_EX_DRAWDDARROWS extended style to BTNS_DROPDOWN have an arrow that is separated from the text or image. This button style combines the functionality of drop-down and standard buttons. If the user clicks the arrow, a menu is displayed and the user can choose from several commands. If the user clicks the adjacent button, it launches a default command. The following screen shot shows the Internet Explorer Back button, which uses a separated arrow.
When the user clicks a drop-down button with either the plain or simple arrow styles, the toolbar control sends your application a TBN_DROPDOWN notification. When your application receives this message, it is responsible for creating and displaying the menu, and for handling the selected command.
When the user clicks a separated arrow, the toolbar control sends your application a TBN_DROPDOWN notification. Your application should handle it the same way as it handles the other two types of drop-down buttons. If the user clicks the main button, your application receives a WM_COMMAND message with the button's command ID, just as if it were a standard button. Applications typically respond by launching the top command in the drop-down menu, but you are free to respond in any suitable way.