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. WinXP Visual Styles (Themes)

WinXP Visual Styles (Themes)

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionwpfjson
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.
  • R Offline
    R Offline
    Rui Lopes
    wrote on last edited by
    #1

    Hello all! I’m trying to use the new Windows XP Visual Styles API (the themes stuff) to draw a toolbar, but I’m stuck X| I’m trying to get the font to draw the buttons but I have no idea of what is a PropId or where to get it from..... and the help of online help helps nothing...... So my question is, what is a PropId and where are they defined? My code snipped, HWND m_hWnd; HDC hDc; ... HTHEME hThemeToolBar= ::OpenThemeData(m_hWnd, L"TOOLBAR"); LOGFONT log; // the propid (?) that I’ve copied from the TmSchema.h file int iPropId= TMT_CAPTIONFONT; // What value to place here? I’ve also tried to make a for with all possible values but only one (PropId 12) returned a valid hr result :( and that one with a strange LONGFONT result….. HRESULT hr= ::GetThemeFont(hThemeToolBar, hDc, TP_BUTTON, TS_NORMAL, iPropId, &log); ... The error returned has always 0x80070490 (Element not found.)... the PropId 12 is the only one that returned a hr of 0, but I have no idea of what is it.... since the font returned is very strange.... and also with the call to GetThemeFont the Theme handle (hThemeToolBar) becomes invalid!? :confused: Anyone can help me with this? Thanks in advance! Rui Lopes

    S 1 Reply Last reply
    0
    • R Rui Lopes

      Hello all! I’m trying to use the new Windows XP Visual Styles API (the themes stuff) to draw a toolbar, but I’m stuck X| I’m trying to get the font to draw the buttons but I have no idea of what is a PropId or where to get it from..... and the help of online help helps nothing...... So my question is, what is a PropId and where are they defined? My code snipped, HWND m_hWnd; HDC hDc; ... HTHEME hThemeToolBar= ::OpenThemeData(m_hWnd, L"TOOLBAR"); LOGFONT log; // the propid (?) that I’ve copied from the TmSchema.h file int iPropId= TMT_CAPTIONFONT; // What value to place here? I’ve also tried to make a for with all possible values but only one (PropId 12) returned a valid hr result :( and that one with a strange LONGFONT result….. HRESULT hr= ::GetThemeFont(hThemeToolBar, hDc, TP_BUTTON, TS_NORMAL, iPropId, &log); ... The error returned has always 0x80070490 (Element not found.)... the PropId 12 is the only one that returned a hr of 0, but I have no idea of what is it.... since the font returned is very strange.... and also with the call to GetThemeFont the Theme handle (hThemeToolBar) becomes invalid!? :confused: Anyone can help me with this? Thanks in advance! Rui Lopes

      S Offline
      S Offline
      shiraztk
      wrote on last edited by
      #2

      Hi I am working on a ActiveX project where I want to implement XP Theme onto my controls. While searching www.codeproject.com I came across your posting, and ofcourse without an answer. (infact I could find only yours) Could you please spare some time of yours? I am also in the same posistion as you, and couldnt find answers regarding this. Did you manage to use GetThemeFont on BUTTON and TOOLBAR ? If so I will be grateful if you could share this with me. Thanking you and awaiting your response, Mohamed Shiraz T K

      The Best Religion is Science. Once you understand it, you will know God.

      R 1 Reply Last reply
      0
      • S shiraztk

        Hi I am working on a ActiveX project where I want to implement XP Theme onto my controls. While searching www.codeproject.com I came across your posting, and ofcourse without an answer. (infact I could find only yours) Could you please spare some time of yours? I am also in the same posistion as you, and couldnt find answers regarding this. Did you manage to use GetThemeFont on BUTTON and TOOLBAR ? If so I will be grateful if you could share this with me. Thanking you and awaiting your response, Mohamed Shiraz T K

        The Best Religion is Science. Once you understand it, you will know God.

        R Offline
        R Offline
        Rui Lopes
        wrote on last edited by
        #3

        Hello, Sorry, but I didn't managed to make it work. I was just trying it out for the fun, so I scrapped the whole thing. Though, if you can make it work, I would like to known :-)

        ---- Rui Lopes

        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