Print Page | Close Window

Custom Static part of CXTPControlCombo

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=2398
Printed Date: 09 November 2025 at 8:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Custom Static part of CXTPControlCombo
Posted By: Dmitry
Subject: Custom Static part of CXTPControlCombo
Date Posted: 17 June 2005 at 3:47am
Hi,

How does one customize what is drawn in the non-list, ie the static portion of a CXTPControlComboBox?

For example, in Word, the "Line Style" combo shows lines in both drop-list and in the static part on the toolbar:


(The combo box has no edit control).

The customization of the drop-list part is shown in the CustomThemes demo (CControlComboBoxCustomDraw), but the static control is not customised.

Regards,
Dmitry



Replies:
Posted By: Oleg
Date Posted: 17 June 2005 at 6:58am

We added

virtual void CXTPControlComboBox::DrawStaticText(CDC* pDC, CRect rcText)
{

   pDC->SetTextColor(GetXtremeColor(COLOR_WINDOWTEXT)) ;
   pDC->DrawText(GetText(), rcText, DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX); 

}

 

you will be able to override it for next release, patch your sources if you don;t want wait next release:

in XTPOfficeTheme.cpp replace this code to

pControlCombo->DrawStaticText(pDC, rcText);

 



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


Posted By: Dmitry
Date Posted: 19 June 2005 at 7:51pm
Thanks very much!



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