There are a few ways to do this, and of course it all depends on what needs to be resized. Do you have a button you want to keep in the same place, an edit box you want to stretch to the end of the dialog, or a tree ctrl you want to enlarge to take advantage of extra room? I any case I'll give you this to get started. Here is how you would make an edit box longer when the window gets bigger.
void CMyDialog::OnSize(UINT nType, int cx, int cy)
{
CMyDialog::OnSize(nType, cx, cy);
CEdit* pEdit = (CEdit*)GetDlgItem(IDC_MYEDIT_CONTROL);
CRect winRect, ctrlRect;
GetClientRect(&winRect);
WINDOWPLACEMENT ctrlPlacement;
if(pEdit != NULL)
{
pEdit->GetWindowPlacement(&ctrlPlacement);
ctrlRect = ctrlPlacement.rcNormalPosition;
//move right edge of edit box 10 from the border
ctrlRect.right = winRect.right - 10;
pEdit->MoveWindow(ctrlRect, TRUE);
}
}
This should get you started into more complex resizing stuff. All resizing code will use these functions, it's just how you mess with the rects to get the desired results. Good Luck.
-bitwise