CDialog as property-grid item
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=3062
Printed Date: 16 November 2024 at 9:54am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: CDialog as property-grid item
Posted By: farr02
Subject: CDialog as property-grid item
Date Posted: 19 October 2005 at 10:33am
Hello,
I am developing a property-grid item that holds a CDialog. (I know this
is a little bit perverse but my boss wants it;-) At the moment I have
some problems with correct drawing of the CDialog, especially when
expanding/collapsing other categories of the grid the inplace dialog
will not be drawn correctly.
I have overridden the OnDrawItemValue member of my inplace-dialog class
in nearly the same manner as shown for the button-property in the
GridSample but the function will not get called, when the whole item
gets invisible due to expanding an other category. So my inplace dialog
stays visible:-( Anyone can give me a hint on how to handle this
problem?
Best regards,
Holger
|
Replies:
Posted By: farr02
Date Posted: 22 November 2005 at 2:44am
Hello,
finally I have implemented a class, that embeds a CDialog into a
property-grid item. One can see the result in the GridSample-based
demo-project: uploads/farr02/2005-11-22_023757_GridSampleForum.zip - 2005-11-22_023757_GridSampleForum.zip
The new item is a CXTPPropertyGridItem-derived class, which holds a pointer
to CDialog as a member. In the constructor the CDialog will be created,
whereas OnDrawItemValue only shows or hides the dialog via ShowWindow.
It also uses a pointer to the grid for resizing the grid automatically,
if the dialog to be embed is wider than the grid. Caution: the MFC
limits the height of a CListBox-item to 255 pixel (CXTPPropertyGrid is
a CListBox derived class). Dialogs that are higher will be cropped.
Last but not least one has keyboard navigation. (To leave the inplace
dialog press ESC.)
I only have a problem with correct drawing of the dialog. Maybe someone
can take a look at the code and give me a hint why the drawing is
incorrect. (There is a problem with the scrollbars, too but Oleg told
me that this must be a CListBox-bug and he will try to find a
workaround. Maybe in 9.81 everything works fine.)
Best regards
Holger
uploads/farr02/2005-11-22_023757_GridSampleForum.zip -
|
|