|
-
April 10th, 2002, 02:04 AM
#1
Edit Box size
how can i change the size of my edit control accordingly when the user maximises or restores the dialog window. I tried to use WM_SIZE, but I am not able to implement it. Pl help.
-
April 10th, 2002, 02:15 AM
#2
Re: Edit Box size
hi
use SetWindowPos() function for this:
sample code:
CWnd *myEdit=GetDlgItem(IDC_EDIT1);
myEdit->SetWindowPos(,,,,);
See this SetWindowPos() in msdn for details
Regards
SKP
Be sure to rate answers if it helped, to encourage them.
-
April 10th, 2002, 02:37 AM
#3
Re: Edit Box size
I tried to use your suggestion in the way
CWnd *myEditBox = GetDlgItem(IDC_EDIT1);
myEditBox->SetWindowPos(&wndTopMost,0,0,200,500,SWP_SHOWWINDOW);
but it gives memory error. I wrote the about func in the OnSize mess handler.
-
April 10th, 2002, 03:19 AM
#4
Re: Edit Box size
do it as in OnSize
CEdit* edit = (CEdit*)GetDlgItem(ID_OF_UR_CONTROL);
if(edit)
{
//x = left;
//y = top;
//cx = right;
//cy = bottom;
edit->MoveWindow(x,y,cx,cy);
}
Hope this helps
All Luck!

-
April 10th, 2002, 05:13 AM
#5
-
April 28th, 2003, 01:36 PM
#6
how to get current position of Edit Box on my Dialog , so i can resize it in its designed position ??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|