Print Page | Close Window

owner draw combobox in a property grid

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


Topic: owner draw combobox in a property grid
Posted By: vjedlicka
Subject: owner draw combobox in a property grid
Date Posted: 20 December 2007 at 4:02pm

Hello,

I need to add an owner draw combobox with several options to a property grid. How can I convert CXTPPropertyGridItemConstraints to a owner draw combobox?

Thanks for advice
Vaclav

 




Replies:
Posted By: Oleg
Date Posted: 21 December 2007 at 12:57am
Him
 
In your item override
 
void CXTPPropertyGridItem::OnDrawItemConstraint(CDC* pDC, CXTPPropertyGridItemConstraint* pConstraint, CRect rc, BOOL bSelected)
method.


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


Posted By: vjedlicka
Date Posted: 21 December 2007 at 12:55pm
 
Thank you!
 
One more question:
 
When I create my class inherited from CXTPPropertyGridItem, let us say MyCXTPPropertyGridItem, how do I carry out the subclassing? Can I simply cast like this?
 
  MyCXTPPropertyGridItem* pItemLanguage = (MyCXTPPropertyGridItem)pVersion->AddChildItem(new CXTPPropertyGridItem(_T("Language"), _T("English (United States)")));


Posted By: mgampi
Date Posted: 22 December 2007 at 3:33am
Hi;
 
You have to do it this way:
 
 MyCXTPPropertyGridItem* pItemLanguage = (MyCXTPPropertyGridItem)pVersion->AddChildItem(new MyCXTPPropertyGridItem(_T("Language"), _T("English (United States)")));

 


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: vjedlicka
Date Posted: 23 December 2007 at 10:39am
Thanks
Vaclav



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