Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - Problem with CheckBox Background
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with CheckBox Background

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


Joined: 26 May 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdegroux Quote  Post ReplyReply Direct Link To This Post Topic: Problem with CheckBox Background
    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
Back to Top
mdegroux View Drop Down
Newbie
Newbie


Joined: 26 May 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdegroux Quote  Post ReplyReply Direct Link To This Post 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());


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: 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
Back to Top
mdegroux View Drop Down
Newbie
Newbie


Joined: 26 May 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdegroux Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2006 at 9:55am
I found my problem. the message WM_CTLCOLOR wasn't correctly intercepted.
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.