CDialog 不是主框架后代
有没有办法使对话框(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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每个窗口都是另一个窗口的子窗口。 你不能创建一个没有父窗口的窗口。 您能做的最好的事情就是将父级设置为
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().