Windows API dialogs without using resource files(不使用资源文件的 Windows API 对话框)
问题描述
我正在尝试使用 C++ 和 Windows API 创建一个对话框,但我不希望在资源文件中定义该对话框.我在网上找不到任何好的东西,而且我读过的例子似乎都没有以编程方式定义对话框.
I'm trying to create a dialog box using C++ and the windows API, but I don't want the dialog defined in a resource file. I can't find anything good on this on the web, and none of the examples I've read seem to define the dialog programmatically.
我该怎么做?
一个简单的例子就可以了.我还没有做任何复杂的事情.
A simple example is fine. I'm not doing anything complicated with it yet.
推荐答案
Raymond Chen 写了几篇关于对话管理器的帖子:
Raymond Chen wrote a few posts about the dialog manager:
- 对话管理器,第 1 部分:热身
- 对话管理器,第 2 部分:创建框架窗口
- 对话框管理器,第 3 部分:创建控件
- 对话管理器,第 4 部分:对话循环
- 对话框管理器,第 5 部分:转换非模态对话框到模态
- 对话管理器,第 6 部分:消息循环中的微妙之处
- 对话管理器,第 7 部分:消息循环中的更多细节一个>
- 对话框管理器,第 8 部分:对话框中的自定义导航一个>
- 对话框管理器,第 9 部分:对话框中的自定义加速键一个>
这篇关于不使用资源文件的 Windows API 对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:不使用资源文件的 Windows API 对话框


基础教程推荐
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 从 std::cin 读取密码 2021-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- Windows Media Foundation 录制音频 2021-01-01