MFC中Control在浮动窗口中disable的解决方法
来源:互联网 发布:怎么查看服务器域名 编辑:程序博客网 时间:2024/06/05 14:32
you put the event handler in CMainFrame. What I did is I add the event handler in CPaneDialog, which is a sub window of the CMainFrame, how about try the following steps?
1. Drag a button on the IDD_DLG_BAR
2. Double click the button and VS will prompt to create a class for that dialog, choose CDialog because VS class wizard don't allow to derive from CPaneDialog directly.
3. After the new class was created, change the CDialog to CPaneDialog4. Add a event handler for the button in the new class
The button is still disabled
5.if add an ON_UPDATE_COMMAND_UI handler for the button, it is enabled.
其中第五步的代码:
afx_msg void OnUpdateMyControl(CCmdUI* pCmdUI);
BEGIN_MESSAGE_MAP(CDockBotton, CDockablePane)
:
ON_UPDATE_COMMAND_UI(IDC_BUTTON_SCANPure, OnUpdateMyControl)
:
END_MESSAGE_MAP()
void CDockBotton::OnUpdateMyControl(CCmdUI* pCmdUI)
{
pCmdUI->Enable(TRUE);
}
- MFC中Control在浮动窗口中disable的解决方法
- Qt:在mac中disable窗口的resize按钮
- MFC中在picture control中显示图像的方法
- 在MFC中用halcon读图像,显示在主窗口和picture control中
- opencv2 在mfc窗口中显示关于cv::Mat 的解决方法
- 在MFC中使用Tab Control的源代码
- 在MFC中使用Tab Control的方法
- MFC在窗口中贴图
- 在MFC中使用Tab Control
- 在MFC中使用Tab Control
- 在MFC中使用Tab Control
- 在MFC中使用Tab Control
- 在MFC中使用Tab Control
- 在MFC中使用Tab Control
- MFC如何将对话框嵌入浮动窗口中
- MFC窗口中汉字出现乱码 解决方法
- MFC浮动窗口的创建
- 将opencv的窗口嵌入到MFC的picture control中
- [Leetcode] 413. Arithmetic Slices 解题报告
- 图片放大效果
- Android开发之第三方框架使用汇总
- Java NIO与IO
- windows 脚本中取当前时间
- MFC中Control在浮动窗口中disable的解决方法
- oracle-初级使用(表操作)
- 邻接表模型
- ios 后台返回json数据里还有数组集合时,model的配置,model套model
- ajax post php 错误 Input variables exceeded 1000
- 82. Remove Duplicates from Sorted List II。
- unity shader 轮廓外发光(光晕)
- 中国剩余定理证明
- QT程序与html交互(三)------QT WebChannel JavaScript API