你需要响应该按钮的:UPDATE_COMMAND_UI消息,
在VIEW、DOC、FRAME中都可以!
在VIEW、DOC、FRAME中都可以!
解决方案 »
- 问一个MFC多线程的问题
- 拖动 与 domodal 问题
- 请问各位:使用ResizeParentToFit();为什么提示找不到标识符?
- 关于CHtmlView/CDhtmlDialog 写的浏览器虚拟内存释放问题
- windows不断更新怎么办?
- 关于CListctrl的问题?
- 请问语音信号降采样比如原来是16k要变成8k,书上说先低通再抽样,为何?(急,等,谢谢)
- ★难★道★真★的★没★有★人★会★吗★??关 于 如 何 拦 截 "复制文本" 消 息
- 在win32程序如何使用ADO??
- 请教各位大侠~~请问如何表示光标在一个编辑框中呢?
- 是SHFileOperation()目录复制方法的缺陷吗?
- 如何得到一个字符串显示所占用的矩形。
从该文章可知:
A button in a CDialogBar object is disabled automatically if the command routing does not contain a command handler function for the button. To enable a button in a CDialogBar object, the command routing must include a command handler for the button. A button command handler can be an ON_BN_CLICKED(), ON_COMMAND(), or ON_COMMAND_UI() message handler and it must appear in the message map of an object in the command routing. If the parent of the CDialogBar object is a CFrameWnd object, then the command is handled by the active child window or view, by the document attached to the view, by the frame window, and by the application (CWinApp object). Note that because the CDialogBar object is not included in the routing scheme, the ON_BN_CLICKED() or ON_COMMAND() handler must be placed in one of the objects mentioned above that is in the routing scheme and not in the CDialogBar class. 所以,在主框架类里添加接收按钮click消息,但是处理该事件在CDialogBar类里。
从该文章可知:
A button in a CDialogBar object is disabled automatically if the command routing does not contain a command handler function for the button. To enable a button in a CDialogBar object, the command routing must include a command handler for the button. A button command handler can be an ON_BN_CLICKED(), ON_COMMAND(), or ON_COMMAND_UI() message handler and it must appear in the message map of an object in the command routing. If the parent of the CDialogBar object is a CFrameWnd object, then the command is handled by the active child window or view, by the document attached to the view, by the frame window, and by the application (CWinApp object). Note that because the CDialogBar object is not included in the routing scheme, the ON_BN_CLICKED() or ON_COMMAND() handler must be placed in one of the objects mentioned above that is in the routing scheme and not in the CDialogBar class. 所以,在主框架类里添加接收按钮click消息,但是处理该事件在CDialogBar类里。