Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Custom Static part of CXTPControlCombo
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom Static part of CXTPControlCombo

 Post Reply Post Reply
Author
Message
Dmitry View Drop Down
Groupie
Groupie


Joined: 28 November 2004
Location: Australia
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmitry Quote  Post ReplyReply Direct Link To This Post Topic: Custom Static part of CXTPControlCombo
    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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 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
Back to Top
Dmitry View Drop Down
Groupie
Groupie


Joined: 28 November 2004
Location: Australia
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmitry Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2005 at 7:51pm
Thanks very much!
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.031 seconds.