简体   繁体   中英

Implementing Loading Screens

Sometimes it can take a while to load a binary executable. Applications like GIMP and Code::Blocks have loading screens that pop up almost immediately, and give status messages until the full application is loaded.

How do they get a loading screen to pop up instantaneously and start showing progress before the rest of the application is loaded.

WxWidgets in C++ specific answers are sought.

Have you looked at wxSplashScreen?

http://docs.wxwidgets.org/trunk/classwx_splash_screen.html

Display this window first, before starting any time consuming initialization.

BTW, if your initialization code is taking a long time to complete, you should probably take a look at its design.

Splash screens are small programs in and of themselves. They load their parent program and then close. You may have noticed (at least for windows) that the splash screen opens a task bar button while loading and then for an instant two will be open then one will close. This is the main program opening and the splash screen program closing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM