Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - BindSample and CXTResizeDialog
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BindSample and CXTResizeDialog

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


Joined: 27 October 2005
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote rock Quote  Post ReplyReply Direct Link To This Post Topic: BindSample and CXTResizeDialog
    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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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


Joined: 27 October 2005
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote rock Quote  Post ReplyReply Direct Link To This Post 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
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.160 seconds.