Print Page | Close Window

Problem with CheckBox Background

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=4287
Printed Date: 14 May 2024 at 3:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with CheckBox Background
Posted By: mdegroux
Subject: Problem with CheckBox Background
Date Posted: 26 May 2006 at 6:37am
In my taskpanel, I have inserted a checkbox as a ControlItem.
The background of my checkbox is the default dialog background (gray) and not the color of the taskpanel

I've tryed to receive the message WM_CTLCOLOR but it doesn't work

How can I change the color?

Best Regards



Replies:
Posted By: mdegroux
Date Posted: 26 May 2006 at 6:41am
here is the code I use to insert the checkbox:



header file:

CButton m_CheckPrint;
CXTPTaskPanel m_wndTaskPanel;

source file:
m_CheckPrint.Create(Chaine(MAKEINTRESOURCE(IDS_IMPRIMEES)),W S_CHILD | WS_VISIBLE | BS_AUTO3STATE, CRect(0,0,0,18), this,IDC_CHECK_PRINT);
m_CheckPrint.SetFont(XTPPaintManager()->GetRegularFont()) ;

CXTPTaskPanelGroup* pGroup = m_wndTaskPanel.AddGroup(0):
CXTPTaskPanelGroupItem* pItem = pGroup->AddControlItem(m_CheckPrint.GetSafeHwnd());




Posted By: Oleg
Date Posted: 26 May 2006 at 9:51am

Hello,

See Samples\UserInterface\GUI_OneNote it has checkbox and catch WM_CTLCOLOR to draw background...



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: mdegroux
Date Posted: 26 May 2006 at 9:55am
I found my problem. the message WM_CTLCOLOR wasn't correctly intercepted.



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