Does the BS_SPLITBUTTON button type work for Windows XP?
-
Hi all: This is my first post here. ¡I hope I'm posting in the right forum! I'm programming a WIN32 application and I'm unable to make a "split button" to show correctly when I write that code:
CreateWindow(L"button", L"", WS_CHILD | WS_VISIBLE | BS_SPLITBUTTON, 0, 0, 20, 20, hwnd, (HMENU)-1, hInst, 0);
I know that sort of button is a common control so I previously added the comctl32.lib library to my project then used InitCommonControls. I also know that type of button is for the 6.0 version of the library (WXP and Vista), so I also put that manifest in my code:
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")Well, the result of that is that the button is created (the HWND handle returned by CreateWindow is not 0 and I'm even able to get input of it) but it just shows as a black rectangle. The fact is that I was able to make this type of button appear when I created a toolbar and used TB_ADDBUTTONS to create a BTNS_DROPDOWN or TBSTYLE_DROPDOWN type button that is the same kind of button... I know that is a very specific kind of problem and I don't have much hope to get any answers but thanks a lot in advance.
-
Hi all: This is my first post here. ¡I hope I'm posting in the right forum! I'm programming a WIN32 application and I'm unable to make a "split button" to show correctly when I write that code:
CreateWindow(L"button", L"", WS_CHILD | WS_VISIBLE | BS_SPLITBUTTON, 0, 0, 20, 20, hwnd, (HMENU)-1, hInst, 0);
I know that sort of button is a common control so I previously added the comctl32.lib library to my project then used InitCommonControls. I also know that type of button is for the 6.0 version of the library (WXP and Vista), so I also put that manifest in my code:
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")Well, the result of that is that the button is created (the HWND handle returned by CreateWindow is not 0 and I'm even able to get input of it) but it just shows as a black rectangle. The fact is that I was able to make this type of button appear when I created a toolbar and used TB_ADDBUTTONS to create a BTNS_DROPDOWN or TBSTYLE_DROPDOWN type button that is the same kind of button... I know that is a very specific kind of problem and I don't have much hope to get any answers but thanks a lot in advance.
The Split Button is a new control that requires Vista or newer: http://msdn.microsoft.com/en-us/library/bb775951(VS.85).aspx[^]
BS_SPLITBUTTON Windows Vista and Version 6.00. Creates a split button. A split button has a drop down arrow.