Print Page | Close Window

CDC::DrawFrameControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9177
Printed Date: 14 November 2025 at 8:14am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CDC::DrawFrameControl
Posted By: Simon HB9DRV
Subject: CDC::DrawFrameControl
Date Posted: 25 December 2007 at 11:37am
Hi Oleg,
 
I am sure I have seen this mentioned before - how do I draw a Codejock checkbox using the current theme / skin etc.
 
At the moment I am using CDC::DrawFrameControl but would much prefer the Codejock style. I am overwriting an existing image with a checkbox (see below).
 
 
If possible I would also like to know the correct (ideal) size of the checkbox.
 
Thanks and have a nice holiday soon,
 
Simon in snowy Switzerland


-------------
Simon HB9DRV



Replies:
Posted By: Oleg
Date Posted: 25 December 2007 at 4:19pm
Hi,
 
Here some hints:
 
CXTPWinThemeWrapper m_themeButton;
m_themeButton.OpenTheme(0, L"BUTTON");
 
int nState = !bEnabled? RBS_UNCHECKEDDISABLED: bPressed? RBS_UNCHECKEDPRESSED: bHot? RBS_UNCHECKEDHOT: RBS_UNCHECKEDNORMAL;
  if (bChecked)
   nState += 4;
  if ((bChecked == BST_INDETERMINATE) && (bStyle == BS_AUTO3STATE || bStyle == BS_3STATE))
   nState += 4;
  m_themeButton.DrawThemeBackground(pDC->GetSafeHdc(), BP_CHECKBOX, nState, rcRadio, NULL);



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


Posted By: Simon HB9DRV
Date Posted: 25 December 2007 at 4:59pm
Thanks Oleg, I'll give it a go now...

-------------
Simon HB9DRV



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