How do I hide an edit box using code, not by checking/unchecking the visible box in the Edit Properties box.
I'm trying to write an if statement to determine whether or not a box should be visible.
Printable View
How do I hide an edit box using code, not by checking/unchecking the visible box in the Edit Properties box.
I'm trying to write an if statement to determine whether or not a box should be visible.
To hide it:
ShowWindow(edit_handle, SW_HIDE);
To show it again:
ShowWindow(edit_handle, SW_SHOW);
I hope this helps!
ShowWindow(GetDlgItem(hwnd, ID_OF_CONTROL),SW_HIDE);
MFC. and a dialog
GetDlgItem(IDC_EDIT1)->ShowWindow(TRUE); //Show edit
GetDlgItem(IDC_EDIT1)->ShowWindow(FALSE);//Hide edit