User forums > Using Code::Blocks

Splash Screen

<< < (3/5) > >>

Ceniza:
It's a shame I have to leave now. If you find anything useful don't forget to post it.

Making cbSplashScreen receive the flags would solve the other problem. At least that one is quite easy to fix :)

I wish you luck!

thomas:
Yay! I've got rid of the flickering for good, and it is really easy, too:


--- Code: ---EVT_ERASE_BACKGROUND(cbSplashScreen::Null)

void Null(wxEraseEvent &){};
--- End code ---

Ceniza:
So that will do the whole trick for Windows but... for Linux?

I've got the grey frame with the default splash screen for Linux too before the real bitmap is shown (even more if the machine is "slow" (PIII 800MHz)). Only when I take a look carefully in my machine I can notice it sometimes, but it takes a short time, same thing for Windows.

I guess it's time for Don Corleone to check again in his Ubuntu. I'll try with Kubuntu in a few minutes and replace the splash_multiple.zip file with those things and the new constructor.

Ceniza:
I've been trying many different things with no success.


--- Quote from: wxWidgets 2.6.2 about wxEraseEvent ---On some platforms, such as GTK+, this event is simulated (simply generated just before the paint event) and may cause flicker. It is therefore recommended that you set the text background colour explicitly in order to prevent flicker. The default background colour under GTK+ is grey.
--- End quote ---


--- Quote from: wxWidgets 2.6.2 about wxWindow::SetBackgroundStyle ---On GTK+, use of wxBG_STYLE_CUSTOM allows the flicker-free drawing of a custom background, such as a tiled bitmap. Currently the style has no effect on other platforms.
--- End quote ---

I've tried that one and got the same results (but continue reading).


--- Quote from: wxWidgets 2.6.2 about wxWindow::SetThemeEnabled ---This function tells a window if it should use the system's "theme" code to draw the windows' background instead if its own background drawing code. This does not always have any effect since the underlying platform obviously needs to support the notion of themes in user defined windows. One such platform is GTK+ where windows can have (very colourful) backgrounds defined by a user's selected theme.
--- End quote ---


--- Quote from: wxWidgets 2.6.2 about wxTRANSPARENT_WINDOW ---The window is transparent, that is, it will not receive paint events. Windows only.
--- End quote ---

I even tried with shapes and off-screen drawing (placing the frame out of the screen, which wxWidgets didn't like to do).

... SOME MINUTES LATER ...

Moving and moving all that stuff I finally got something that seems to be working :shock:

I just moved the SetBackgroundStyle() call after Show() and it works lovely under Linux!!! And it's also working under Windows!!!

Lets hope it works lovely for Don Corleone and everyone else too :)

This file will be saved in both servers as splash_multiple2.zip (splash not included, but can be extracted from splash.zip).

Ceniza:
I just re-uploaded splash_multiple2.zip because of an unchecked pointer in the previous "version" (potential bug that could lead to a lovely segmentation fault).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version