实现C ++ Win32闪屏的最快方式 [英] Quickest way to implement a C++ Win32 Splash Screen

查看:272
本文介绍了实现C ++ Win32闪屏的最快方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是一个简单的方法来实现一个c ++ Win32程序...

- 显示一个800x600x24未压缩的位图图像

- 在一个无边框的窗口可见的是图像)

- 在十秒后关闭

- 不使用MFC

What's a simple way to implement a c++ Win32 program to...
- display an 800x600x24 uncompressed bitmap image
- in a window without borders (the only thing visible is the image)
- that closes after ten seconds
- and doesn't use MFC

推荐答案

您可以:


  • 在资源文件中创建一个对话框


  • 将图片控制类型设置为位图

  • 在资源文件中创建/导入位图,并设置位图ID to the picture control in your dialog

  • 使用CreateDialogParam创建窗口

  • 处理WM_INITDIALOG以设置定时器10秒Settimer)

  • 处理WM_TIMER以捕获您的计时器事件并销毁窗口(使用DestroyWindow)

  • Create a dialog in your resource file
  • Have it contain a Picture control
  • Set the picture control type to Bitmap
  • Create/import your bitmap in the resource file and set that bitmap ID to the picture control in your dialog
  • Create the window by using CreateDialogParam
  • Handle the WM_INITDIALOG in order to set a timer for 10 seconds (use SetTimer)
  • Handle WM_TIMER to catch your timer event and to destroy the window (use DestroyWindow)

这篇关于实现C ++ Win32闪屏的最快方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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