Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - skin and bitmap in a dialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

skin and bitmap in a dialog

 Post Reply Post Reply
Author
Message
Dominique View Drop Down
Newbie
Newbie


Joined: 06 July 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dominique Quote  Post ReplyReply Direct Link To This Post Topic: skin and bitmap in a dialog
    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
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.188 seconds.