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