如何在窗口菜单中显示可用窗口
我有一个 MFC MDI 应用程序,最近从 VS2003 移植到 VS2008,同时从 Stingray Objective Studio 2006 v2 迁移到 v10.1。 在我的应用程序的早期版本中,如果我打开了多个视图,窗口菜单将由可用视图的枚举列表填充,例如 1 MyViewA、2 MyViewB 等等...如果我有大量视图,我还会获得一个Windows... 菜单选项来允许我选择一个视图。 这种情况不再发生,这破坏了我的一些 GUI 级回归测试。 我的猜测是,此功能是由 CMDIFrameWnd 或 SECMDIFrameWnd 实现的,但我在文档中找不到对其的引用。 有谁知道我如何才能恢复此功能。
I have a MFC MDI application that I've recently ported from VS2003 to VS2008, and at the same time moved from Stingray Objective Studio 2006 v2 to v10.1. On the previous versions of my application, if I had more than one view open, the Window menu would be populated by an enumerated list of available views, e.g. 1 MyViewA, 2 MyViewB etc... If I had a large number of views, I would also get a Windows... menu option to allow me to select a view. This no longer happens, which is breaking some of my GUI level regression tests. My guess is that this functionality was implemented by either CMDIFrameWnd or SECMDIFrameWnd but I couldn't find a reference to it in the documentation. Does anyone know how I can get this functionality back.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我要做的第一件事是使用 ClassWizard 创建一个新的 MDI 应用程序,并检查您缺少的功能是否存在。 如果是这样,请四处看看,看看您是否能看出有什么不同。 一个值得一看的地方可能是主菜单的菜单资源。
如果没有内置功能可以提供您所需的功能,您可以使用以下伪代码动态构建菜单:
First thing I'd do is create a new MDI application with the ClassWizard and check if the functionality you're missing is present. If so, poke around and see if you can tell what's different. One place to look may be the menu resource for the main menu.
If there is no in-built functionality to provide what you need, you can dynamically build the menu with the following pseudocode: