Re: Resizing a CEdit control to fill its parent DialogBox???
- From: "Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp>
- Date: Sat, 24 Mar 2007 17:36:17 -0400
Peter Olcott wrote:
void CScrollBitmapDlg::OnSize(UINT nType, int cx, int cy) {
CEdit *editbox = (CEdit *) GetDlgItem(IDC_EDIT1);
RECT rect;
this->GetClientRect(&rect);
int Width = rect.right - rect.left;
int Height = rect.bottom - rect.top;
//editbox->MoveWindow(&rect);
editbox->SetWindowPos(NULL, 0, 0, Width, Height, SWP_NOMOVE | SWP_NOZORDER);
CDialog::OnSize(nType, cx, cy);
}
Why isn't this code correctly changing the size of the editbox to match the size of the DialogBox?
if (editbox)
editbox->MoveWindow(0, 0, cx, cy);
--
Scott McPhillips [VC++ MVP]
.
- References:
- Resizing a CEdit control to fill its parent DialogBox???
- From: Peter Olcott
- Resizing a CEdit control to fill its parent DialogBox???
- Prev by Date: Resizing a CEdit control to fill its parent DialogBox???
- Next by Date: Re: Resizing a CEdit control to fill its parent DialogBox???
- Previous by thread: Resizing a CEdit control to fill its parent DialogBox???
- Next by thread: Re: Resizing a CEdit control to fill its parent DialogBox???
- Index(es):
Relevant Pages
|