CDialog 不是主框架后代

发布于 2024-07-30 11:45:04 字数 170 浏览 2 评论 0原文

有没有办法使对话框(CDialog)不是主框架的后代?

如果我在创建时未指定父窗口,则父窗口是主应用程序窗口。 我尝试将 SetOwner 和 SetParent 与 NULL 参数一起使用,但没有成功。

那么有没有办法让对话框不是主窗口的子窗口或最终是主窗口子窗口的任何其他窗口?

Is there a way to make a dialog (CDialog) not descendant of the main frame?

If I don't specify a parent window at creation time the parent window is the main application window. I have tried to use SetOwner and SetParent with a NULL parameter but didn't work.

So is there any way to make a dialog not child of the main window or any other window that ultimately is a child of the main window??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

以往的大感动 2024-08-06 11:45:04

每个窗口都是另一个窗口的子窗口。 你不能创建一个没有父窗口的窗口。 您能做的最好的事情就是将父级设置为 DesktopWindow。 您可以通过 GetDesktopWindow() 获取桌面窗口。

Every window is a child of another window. You can't make a window which doesn't have a Parent. Best you can do is to set the parent to DesktopWindow. You can get desktop window through GetDesktopWindow().

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文