Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - Skinning property sheet / OnCtlColor
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skinning property sheet / OnCtlColor

 Post Reply Post Reply
Author
Message
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: Skinning property sheet / OnCtlColor
    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
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: 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
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.141 seconds.