[Visual C ++]在加载事件中隐藏表单 [英] [Visual C++] Hide form in Load Event

查看:78
本文介绍了[Visual C ++]在加载事件中隐藏表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想在应用程序启动时将其隐藏,然后在OnLoad中添加:

Hi all,

I want to hide my application when it started, and I add:

this->Hide();

到OnLoad中事件,但无法隐藏.我可以将

into OnLoad event, but it cannot be hidden. I can add

this->Hide();

添加到Activate事件中,但是我不想添加它代码进入Activate事件.因此,您知道如何将

into Activate event, but I don''t want add this code into Activate event. So, Do you know how to add

this->Hide();

添加到Load事件吗?

谢谢

into Load event?

Thank you

推荐答案

可以将其放入"Shown"事件处理程序中
You could put it into the "Shown" event handler


如果它是普通的win32应用程序(非mfc ),则不要在 CreateWindow 函数中使用窗口样式 WS_VISIBLE .

如果它是MFC应用程序,则请遵循链接 [
If its a plain win32 application (non mfc) then just dont use the window style WS_VISIBLE in your CreateWindow function.

if it is an MFC application then follow the link[^]


这篇关于[Visual C ++]在加载事件中隐藏表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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