vc++ 添加CWnd*类型 控件变量

来源:百度知道 编辑:UC知道 时间:2024/06/17 20:25:07
于控制控件的可用性

CWnd *p_Wnd = (CWnd *)GetDlgItem(你的控件ID);

pWnd->Enable(true/false);

先使用GetDlgItem()函数获取到指针,再使用成员函数去设置其可用性。
GetDlgItem(IDC_BUTTON_ID)->EnableWindow(FALSE);