|
-
April 23rd, 1999, 12:55 PM
#1
HELP!! Resizing and moving a child edit control within a dialog based app
Hello,
I am new to Windows Programming, especially the UI part.... I am facing this problem:
I am writing a dialog based app, that contains a child edit control. I want to decrease the height of the edit control (say, by 'n' units), and shift its position downward by 'n' units.... in a way, creating space above the edit control, to dynamically create other controls. Except for the height and vertical position of the control, nothing changes.
I don't know how to accomplish this. I would appreciate if you could help me out with this.
Thanks a lot in advance,
Narasimha
-
April 23rd, 1999, 11:52 PM
#2
Re: HELP!! Resizing and moving a child edit control within a dialog based app
Hi buddy,
I'm not sure but try using SetWindowPos...
There u have options for noresize and nomove and a lot more
hope this helps
anuvk
-
April 24th, 1999, 12:55 AM
#3
Re: HELP!! Resizing and moving a child edit control within a dialog based app
anuvk is right!
try this!
say " Move edit-contrl to the position where Left-Mouse-Button is clicked. "
void CMyDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
//TODO: Add...
CEdit *pEdit=(CEdit *)GetDlgItem(IDC_EDIT1);
pEdit->SetWindowPos(NULL,point.x,point.y,30,40,SWP_DRAWFRAME);
CDialog::OnLButtonDown(nFlags,point);
}
I hope that this solution is your answer!
by <I><font color=cyan>nfuox</font></I>
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
|