Hit Ctrl+W to bring up the class wizard. On the "Message Maps" tab, select your dialog class (it is probably already selected), and find WM_SIZE in the Messages list box. Click it and hit OK to create the new handler. In the handler, do something like this:
void CMyDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
GetDlgItem(IDC_LIST)->SetWindowPos(NULL, 0, 0, cx - 5, cy - 5, SWP_NOMOVE | SWP_NOZORDER);
}