Button transparent background problem |
Post Reply |
Author | |
miatu
Newbie Joined: 07 May 2008 Location: Ukraine Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 05 October 2010 at 3:12pm |
Thank You very much. This helps
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Please create Brush from your birmap and return it in CtlColor instead of HOLLOW_BRUSH.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
miatu
Newbie Joined: 07 May 2008 Location: Ukraine Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Hi. I have a problem with button transparent background. I have a dialog based application. I draw background on it. When i use skin i have black background under radio button and checkbox(view attach). When i don't use style all is ok. Help, please.
XTPSkinManager()->LoadSkin(L"\\Styles\\iTunes", L"Normalitunes.INI"); For buttons i use this class: class TransparentButton : public CButton { DECLARE_DYNAMIC(TransparentButton) protected: DECLARE_MESSAGE_MAP() public: afx_msg HBRUSH CtlColor(CDC* dc, UINT ctlColor); afx_msg BOOL OnEraseBkgnd(CDC* dc); }; IMPLEMENT_DYNAMIC(TransparentButton, CButton) BEGIN_MESSAGE_MAP(TransparentButton, CButton) ON_WM_CTLCOLOR_REFLECT() ON_WM_ERASEBKGND() END_MESSAGE_MAP() HBRUSH TransparentButton::CtlColor(CDC* dc, UINT ctlColor) { dc->SetBkMode(TRANSPARENT); return (HBRUSH)GetStockObject(HOLLOW_BRUSH); } BOOL TransparentButton::OnEraseBkgnd(CDC* dc) { return TRUE; } |
|
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 |