创建类CWindowImpl的窗口方法导致应用程序崩溃 [英] Create window method of the class CWindowImpl causing crash in application

查看:84
本文介绍了创建类CWindowImpl的窗口方法导致应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,


我在C ++应用程序中使用类CWindowImpl的Create窗口方法(Application是使用Visual Studio 6.0构建并在Windows 10上运行)。下面是我的方法调用格式。


此调用导致应用程序崩溃,


m_hmyWnd = Create(:: GetDesktopWindow(),rect,NULL,WS_CHILD) ;



GetDesktopWindow()独立调用时运行良好。你可以帮我确定一下这个问题吗?



谢谢,


Prasad




Prasad B

解决方案

您好,


GetDesktopWindow返回全屏:
https: //docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getdesktopwindow


您无法创建桌面窗口的子窗口。您只能创建当前应用的子窗口。


您希望通过创建呼叫实现什么目标?


此致,Guido


Hi Team,

I am using Create window method of the class CWindowImpl in C++ application (Application is build using Visual studio 6.0 and running on Windows 10). Below is my calling format for the method.

This call causes the application to crash,

m_hmyWnd = Create(::GetDesktopWindow(), rect, NULL, WS_CHILD);

GetDesktopWindow() when called independently is working well. Can you please help me to identify the issue?

Thank you,

Prasad


Prasad B

解决方案

Hello,

GetDesktopWindow returns the full screen: https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getdesktopwindow

You cannot create a child window of the Desktop window. You can only create child windows of your current app.

What do you want to achieve with your Create-Call?

Regards, Guido


这篇关于创建类CWindowImpl的窗口方法导致应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆