Skinning property sheet / OnCtlColor |
Post Reply |
Author | |
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
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
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |