ShowWindow is THE API to use to show and hide windows, if your window does not exist yet, the function will assert. Try making sure that the window you are calling this function on is valid before you call this function. an exmaple of this would be Page::OnInitDialog(); { BOOL ret = CPropertyPage::OnInitDialog(); CWnd *pWnd = GetDlgItem(IDC_MY_WINDOW); if (!pWnd || !::IsWindow(pWnd->GetSafeHwnd()) { ASSERT(FALSE); } else pWnd->ShowWindow(SW_HIDE); // or whatever you want to do with it. } Did you use classwizard to generate control variables for your window objects? /yawar