Print Page | Close Window

skin and bitmap in a dialog

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=6472
Printed Date: 27 November 2024 at 11:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: skin and bitmap in a dialog
Posted By: Dominique
Subject: skin and bitmap in a dialog
Date Posted: 21 February 2007 at 5:33am

I would like to skin my MFC application with the skin framework.

But i have a problem when i put a bitmap onto the background of a dialog box. In fact, some controls (like radio buttons) are not painted transparently.
 
Without applying skin, it works.
 
In my code, OnCtlColor looks like this :
HBRUSH CMyDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
 HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
  
  if (nCtlColor == CTLCOLOR_STATIC || nCtlColor == CTLCOLOR_BTN)
 {
   pDC->SetBkMode( TRANSPARENT );
   return (HBRUSH)m_brStaticControl;//HOLLOW_BRUSH
 }
 
 return hbr
}
 
Thanks in advance



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