Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - owner draw combobox in a property grid
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

owner draw combobox in a property grid

 Post Reply Post Reply
Author
Message
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post Topic: owner draw combobox in a property grid
    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

 

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: 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
Back to Top
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post 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)")));
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1210
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
vjedlicka View Drop Down
Senior Member
Senior Member


Joined: 04 September 2007
Status: Offline
Points: 122
Post Options Post Options   Thanks (0) Thanks(0)   Quote vjedlicka Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2007 at 10:39am
Thanks
Vaclav
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.047 seconds.