Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. Does the BS_SPLITBUTTON button type work for Windows XP?

Does the BS_SPLITBUTTON button type work for Windows XP?

Scheduled Pinned Locked Moved Windows API
helpquestionannouncement
2 Posts 2 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nestor_rg
    wrote on last edited by
    #1

    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.

    P 1 Reply Last reply
    0
    • N nestor_rg

      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.

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups