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. C / C++ / MFC
  4. Toolbar Drop-down Button Width [modified]

Toolbar Drop-down Button Width [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
databasegraphicshelptutorialquestion
1 Posts 1 Posters 0 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.
  • T Offline
    T Offline
    T Mac Oz
    wrote on last edited by
    #1

    Dramas, I've subclassed CToolBar to custom draw toolbars & I've worked around most of the quirks but I'm somewhat stuck when it comes to drawing the down arrow on a button with the BTNS_WHOLEDROPDOWN style or BTNS_DROPDOWN with TBSTYLE_EX_DRAWDDARROWS on the toolbar. From a bit of experimenting in XP I've found: BTNS_WHOLEDROPDOWN with TBSTYLE_AUTOSIZE on increases a button's width by 6 BTNS_WHOLEDROPDOWN with TBSTYLE_AUTOSIZE off increases a button's width by 7 BTNS_DROPDOWN with TBSTYLE_AUTOSIZE on increases a button's width by 19 BTNS_DROPDOWN with TBSTYLE_AUTOSIZE off increases a button's width by 18 (I'm assuming some of the 18/19 is padding but how much?). After playing with CToolBar::SetMetrics, I can confidently say that the toolbar & button padding settings do not affect the drop-down width but I can't find any documentation on how to query the O/S for the drop down width, or whether any system settings (e.g. themes) or other O/S versions will give different values. Is there something I've missed? Or can anyone confirm whether the drop down widths listed above are always true? -- modified at 10:02 Friday 10th August, 2007

    T-Mac-Oz

    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