As you can see there is nothing to prevent an MFC dialog-based app from hiding controls. For example, an event handler for the BN_CLICK message from one of the Show/Hide buttons looks like this -
void CMFCHideCtlDlg::OnBnClickedEditsh()
{
m_Edit.ShowWindow(m_Edit.IsWindowVisible() ? SW_HIDE : SW_SHOW);
// or if dialog controls are not bound to dialog box member variables
//CWnd* pWnd = GetDlgItem(IDC_EDIT1);
//pWnd->ShowWindow(pWnd->IsWindowVisible() ? SW_HIDE : SW_SHOW);
}
So if you share your code with us we can point out why it doesn't function as you intend. Otherwise, we are left to guess at what your code is doing (that doesn't work).