Print Page | Close Window

Skinning property sheet / OnCtlColor

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=6186
Printed Date: 26 September 2024 at 1:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Skinning property sheet / OnCtlColor
Posted By: ABuenger
Subject: Skinning property sheet / OnCtlColor
Date Posted: 22 January 2007 at 3:10pm
After upgrading from 10.3.1 to 10.4 (as well as 10.4.1) some controls (labels, checkbox) are not skinned correctly anymore.

The problem is that OnCtlColor of the property page is overloaded and returns a white brush, because without skinning the background should be white.

Is this a bug or is the changed behaviour intended?



To reproduce this:

In SkinPropertyPageControls.h add:


//{{AFX_MSG(CSkinPropertyPageControls)
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
virtual BOOL OnInitDialog();
//}}AFX_MSG


In SkinPropertyPageControls.cpp add:

//{{AFX_MSG_MAP(CSkinPropertyPageControls)
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP

HBRUSH CSkinPropertyPageControls::OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor)
{
    pDC->SetBkMode (TRANSPARENT);
    return ::GetSysColorBrush (COLOR_WINDOW);
}



-------------
Codejock support



Replies:
Posted By: Oleg
Date Posted: 23 January 2007 at 11:27am

Hi,

It was problem in 10.3/10.3.1 and OnCtlColor was not called. Now you can catch it and return  color you need.
 
Check XTPSkinMaanager()->GetEnabled() flag and return NULL...


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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