How to make a boot interface

xiaoxiao2021-03-06  104

3/4 Flash screen, install the Splash Screen component Click on the menu Project / Add to Project / Component and Control, then double-click Visual C Components, select the Splash Screen component, accept the default ID to IDB_SPLASH. (The author has questions here, accept The default ID is when the program is running, there is no flash screen. You can re-take the ID. Try!) Second, insert bitmap is replaced with a ready-made true color graph to replace it. True color graph is unavoidable in the resource editor (it can't open more than 256 colors)! Or, click Resouce View, click the right mouse button on Bitmap, select the "Import ..." menu item, then select the true color bitmap resource you want, set the IDB_SPLASH .. Third, run the program to compile, connect, and the beautiful real color start bitmap is displayed. It's that simple! Fourth, a few points. If you want to change the stay time of the startup screen, modify the second parameters in Settime, here is 750 milliseconds. int CSplashWnd :: OnCreate (LPCREATESTRUCT lpCreateStruct) {if (CWnd :: OnCreate (lpCreateStruct) == -1) return -1;. // Center the window CenterWindow (); // Set a timer to destroy the splash screen SetTimer. (1, 750, null); This residence time is 0.75 seconds, can change the flash time by modifying the second parameter! Return 0; 2. The dialog-based program cannot be inserted into the flash screen, you can set the following: First create a dialogue process, copy the splash.cpp and splash.h files you have already generated to the work folder, and join your dialog-based dialog In the project (Project-> Add to Project-> Files ...).

转载请注明原文地址:https://www.9cbs.com/read-95717.html

New Post(0)