Disable and Enable MFC controls by name
I use this snippet all the time to disable/enable, hide/show, move MFC controls. // Enables and disables an MFC control by name void CCILikeChease::EnableControl( int iControl, bool enable ) { // Enable Control CWnd* wnd_control = (CWnd*)( GetDlgItem( iControl ) ); if( wnd_control != NULL ) { wnd_control->EnableWindow( enable ) ; [...]
