Print Page | Close Window

Skinning on Windows 2000

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=10651
Printed Date: 28 September 2024 at 5:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Skinning on Windows 2000
Posted By: JerryEvans
Subject: Skinning on Windows 2000
Date 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



Replies:
Posted By: Oleg
Date 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


Posted By: JerryEvans
Date Posted: 17 May 2008 at 11:07am
Yes, I suspected as much and have modified the code to use the XTP theme wrapper.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net