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. DrawThemeBackground

DrawThemeBackground

Scheduled Pinned Locked Moved C / C++ / MFC
comquestionannouncement
3 Posts 2 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.
  • PJ ArendsP Offline
    PJ ArendsP Offline
    PJ Arends
    wrote on last edited by
    #1

    Hey all, I am busy updating my CFileEditCtrl class[^] to support XP themes. As part of that update I want the browse button to be drawn the same as a combo box dropdown button, except without the arrow. Using DrawThemeBackground automatically draws the arrow

    HTHEME hTheme = OpenThemeData(*this, L"COMBOBOX");
    LRESULT ret = DrawThemeBackground(hTheme, dc, CP_DROPDOWNBUTTON, CBXS_NORMAL, CRect(10, 10, 27, 27), NULL);

    Is there any option that will draw the themed button background without the arrow?


    You may be right
    I may be crazy
    -- Billy Joel --

    Within you lies the power for good, use it!!!

    Within you lies the power for good; Use it!

    T 1 Reply Last reply
    0
    • PJ ArendsP PJ Arends

      Hey all, I am busy updating my CFileEditCtrl class[^] to support XP themes. As part of that update I want the browse button to be drawn the same as a combo box dropdown button, except without the arrow. Using DrawThemeBackground automatically draws the arrow

      HTHEME hTheme = OpenThemeData(*this, L"COMBOBOX");
      LRESULT ret = DrawThemeBackground(hTheme, dc, CP_DROPDOWNBUTTON, CBXS_NORMAL, CRect(10, 10, 27, 27), NULL);

      Is there any option that will draw the themed button background without the arrow?


      You may be right
      I may be crazy
      -- Billy Joel --

      Within you lies the power for good, use it!!!

      T Offline
      T Offline
      Tarmo Kalda
      wrote on last edited by
      #2

      Hi! There are no any option to do this. Try HTHEME hTheme = OpenThemeData(*this, L"Button"); instead of combobox, or parse manually theme info from .theme file.:sigh: Rgds. Tarmo.

      PJ ArendsP 1 Reply Last reply
      0
      • T Tarmo Kalda

        Hi! There are no any option to do this. Try HTHEME hTheme = OpenThemeData(*this, L"Button"); instead of combobox, or parse manually theme info from .theme file.:sigh: Rgds. Tarmo.

        PJ ArendsP Offline
        PJ ArendsP Offline
        PJ Arends
        wrote on last edited by
        #3

        Unfortunately the standard push button and the combobox buttons are different. In the standard blue theme the push button is white while the combo box button is blue. How does one draw custom controls using themes? Surely there must be an API provided for it if the custom control varies in appearance from the windows standard controls. Pre fisher-price was so much easier:sigh:


        You may be right
        I may be crazy
        -- Billy Joel --

        Within you lies the power for good, use it!!!

        Within you lies the power for good; Use it!

        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