c++ - 循环遍历 MFC 子对话框、MDIFrame 等

标签 c++ mfc

有没有办法遍历所有 MFC 子对话框、MDI 框架等?有没有办法找出我循环浏览的对话框或窗口?

最佳答案

摘自 Анатолий Тутов ( https://web.archive.org/web/20140110220804/http://www.asis.ru/posts/27 ):

for (CWnd *pWnd = GetWindow(GW_CHILD);  pWnd != NULL;  pWnd = pWnd->GetNextWindow(GW_HWNDNEXT))
{
    //Insert your code here. pWnd is a pointer to control window.
}

关于c++ - 循环遍历 MFC 子对话框、MDIFrame 等,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1762933/

相关文章:

c++ - 我可以禁用菜单栏上的菜单项和/或动态显示它吗?

windows - MFC:地址栏控件,如 Windows 资源管理器

c++ - MFC CFileDialog 在用户上次运行时选择的位置打开

c++ - 如何在 MFC 编辑器中对资源 ID 进行编辑以传播到代码?

c++ - 以编程方式更改 Windows Mobile 6.1 主题

c++ - 将结构数组传递给 OpenGL

c++ - 在编译时检查函数是否具有 C 链接 [无法解决]

c++ - 在 C++ 中将十六进制字符转换为 int

c++ - linux 正确的语法以通过配置传递 libstdc++.so.6 的自定义目录

c++ - 'this' cannot be used in a constant expression error (C++)