The WM_ENABLE message is sent when an application changes the enabled state of a window. It is sent to the window whose enabled state is changing. This message is sent before the EnableWindow function returns, but after the enabled state (WS_DISABLED style bit) of the window has changed. 发送是没有用的,只有接收处理这个消息 使用EnableWindow
我是在一个线程中向对话框发WM_ENABLE消息的
那我在线程中怎么取消对话框的Disable呢?
那我在线程中怎么取消对话框里的按钮的Disable状态呢?
EnableWindow(hWndDlg,TRUE); Enable the button EnableWindow(hWndDlg,FALSE); Disable the button Please refer to MSDN for detailed information.
发送是没有用的,只有接收处理这个消息
使用EnableWindow
EnableWindow(hWndDlg,FALSE); Disable the button
Please refer to MSDN for detailed information.
.....
//在OnInitDialog()中
pdlg=this;.....
//在线程函数中,ID_XXX就是按钮的ID
pdlg->GetDlgItem(ID_XXX)->EnableWindow(true);