Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Skinning on Windows 2000
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skinning on Windows 2000

 Post Reply Post Reply
Author
Message
JerryEvans View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2008
Location: United Kingdom
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryEvans Quote  Post ReplyReply Direct Link To This Post Topic: Skinning on Windows 2000
    Posted: 16 May 2008 at 5:59am
I have a custom slider control that is theme aware - on Windows 2000 it correctly identifies that no theming is present and draws using the old style API.

If I have statically linked the XTP skin engine do I need to explicitly add code to my control to call the XTP skin manager when drawing?

If so why? I can see that the Skin Manager is checking for calls to load UxTheme.dll - which is how the control detects the presence of theming

Any thoughts or comments on this please? Skin support for Windows 2000 was a big plus for me and I'd like it to work for all the controls I use in Riffster.

Thanks

Jerry
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 May 2008 at 2:48pm
Hi,
 
UxTheme is partly hooked in SkinFamework. Only using our CXTPWinThemeWrapper you will get skin.  YOu can change your draw to use our CXTPWinThemeWrapper class:
 
 
CXTPWinThemeWrapper m_themeButton
 
m_themeButton.OpenThemeData(hWnd, L"BUTTON");
 
if ( m_themeButton.IsAppThemed())
{
m_themeButton.DrawThemeBackground(*pDC, BP_PUSHBUTTON, !pButton->GetEnabled() ? PBS_DISABLED : pButton->IsPressed() && pButton->IsHot() ? PBS_PRESSED :
    pButton->IsHot() ? PBS_HOT: pButton->IsFocused() ? PBS_DEFAULTED : PBS_NORMAL, rect, 0);
}
 
 
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JerryEvans View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2008
Location: United Kingdom
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote JerryEvans Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2008 at 11:07am
Yes, I suspected as much and have modified the code to use the XTP theme wrapper.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.139 seconds.