Rakesh 我尝试过: 我尝试在隐藏模式下创建新的子项(SW_HIDE)。它没有用。我尝试在mdi主框架客户区域外创建非常小的新孩子。 我尝试将现有窗口放在最上面 (Dear All,I have a MFC MDI project where in on start a maximised MDI child window is created. Later the user can create more MDI children. It is observed that when more children (12 of them) are created by OnFileNew() the existing maximized MDI child is restored and we see the restored mdi child window on screen.Is there a way to stop the restoring of the existing maximized MDI child window.I have got screenshot which shows the problem.Thanks and Regards,RakeshWhat I have tried:I have tried creating the new children in hide mode (SW_HIDE). It didnt work. I tried creating the new children in very small size and outside the mdi main frame client area.I have tried putting the existing window on top (pAnimView->SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);) 和然后调用OnFileNew(); 没什么用。)and then making calls to OnFileNew();Nothing worked.推荐答案 你必须小心实现OnNewFile 命令处理程序。重新编号或重命名ID是弄乱消息处理的常见陷阱。 检查是否创建了新子窗口对象而不是只能用实际对象重新运行命令。You must carefully implement the OnNewFile command handler. Renumbering or renaming the IDs is a common trap for messing up the message handling.Check that you create a new child window object and not only re-run the commands with the actual object. 这篇关于在mfc MDI项目中,onfilenew恢复现有的全屏MDI子项。以任何方式禁用还原。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-11 11:48