![]() |
How to use CXTResizeDialog class |
Post Reply ![]() |
Author | |
eousi ![]() Groupie ![]() Joined: 25 March 2010 Location: China Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() Posted: 30 March 2011 at 10:21pm |
I create a dialog and place a tree control on it.Now I change the size of dialog,and I want the tree control to have the same size with dialog.I use SetResize method of CXTResizeDialog class,but there is a problem.I want to see the sample of this class,Thanks.My code is below:
void CDlgTypeList::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
CXTResizeDialog rszDlg;
CXTResizeRect rszRc;
CRect rc;
GetWindowRect(rc);
rszRc=rc;
rszDlg.SetResize(IDC_TREE, rszRc.left, rszRc.top, rszRc.right, rszRc.bottom);
}
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
If you have only one control to fit whole dialog, its much easear manually resize it in OnSize event.
m_tree.MoveWindow(0, 0, cx, cy);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
eousi ![]() Groupie ![]() Joined: 25 March 2010 Location: China Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I know this method,but I only want to know how to use CXTResizeDialog class.Can you give me a sample?
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |