Quickest way to implement a C++ Win32 Splash Screen

后端 未结 2 504
被撕碎了的回忆
被撕碎了的回忆 2021-02-14 19:54

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 i

2条回答
  •  情歌与酒
    2021-02-14 20:22

    You can:

    • 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)

提交回复
热议问题