Print Page | Close Window

BindSample and CXTResizeDialog

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=8693
Printed Date: 20 May 2024 at 2:20pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: BindSample and CXTResizeDialog
Posted By: rock
Subject: BindSample and CXTResizeDialog
Date Posted: 06 November 2007 at 3:00pm
I have a dialog similar to the one used in the BindSample and I'd like to use CXTResizeDialog.  However; no matter what anchor positions I give for the grid control ID, the grid never resizes.  It is easily reproduced in the BindSample by changing it from a CDialog to a CXTResizeDialog, and by adding the following to InitDialog()...
 
SetResize(IDC_LIST_OPTIONS, SZ_TOP_LEFT, SZ_BOTTOM_LEFT);
SetResize(IDC_STATIC, SZ_BOTTOM_LEFT, SZ_BOTTOM_RIGHT);
SetResize(IDOK, SZ_BOTTOM_RIGHT, SZ_BOTTOM_RIGHT);
SetResize(IDCANCEL, SZ_BOTTOM_RIGHT, SZ_BOTTOM_RIGHT);
SetResize(IDC_WORKSPACE, SZ_TOP_RIGHT, SZ_BOTTOM_RIGHT);
 
Is this not possible due to multiple CXTPPropertyGrids being used with the IDC_WORSPACE control?  Or is there something else I need to do?



Replies:
Posted By: Oleg
Date Posted: 07 November 2007 at 1:14am
Hello,
Obviously in last line you need add Resize not for IDC_WORKSPACE but for id of grid.


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


Posted By: rock
Date Posted: 07 November 2007 at 10:59am
The grid in this particular sample has no ID.  IDC_WORKSPACE is the placeholder control in the dialog template.  This sample has 3 grids that are dynamically created and are shown or hidden based upon the tree selection in another control.  Each grid is created with 0 passed for the ID.
 
So I went back to the sample and assigned each grid a unique ID and now it works properly (sort of, needs tweaking).  Your answer did point me in the right direction.  Thanks



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