Re: Splash Screens , how could something so basic still be hard?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Fri, 17 Apr 2009 16:58:42 -0700, Michael B. Trausch <mbt@xxxxxxxxxxxxxxx> wrote:

[...]
That seems to be the approach I am able to find anyway:

http://www.programmersheaven.com/2/FAQ-WinForm-Splash-Screen

This is the most basic implementation of a splash screen one might come up with. It has the unfortunate flaw that aside from getting the splash screen to display once, there is no message pump to allow for further GUI interactions. For example, if the splash screen, or any other part of the UI, winds up needing to be redrawn (e.g. someone drags a window over it), it won't be able to.

http://www.codersource.net/csharp_splash_screen.aspx

This one is marginally more flexible. In particular, it creates the splash screen itself on a different thread, and then uses ShowDialog() (which has a message pump built-in) to display it. On the other hand, other than that it's not a very good example. It has some serious thread mis-use problems (one should not use Thread.Abort() to terminate threads, nor does it make any sense to use Thread.Sleep() to wait for a thread to exit...use Thread.Join() if you absolutely need that behavior, and don't write code that has to wait on a thread to exit if you can at all help it).

Like the first example, it also provides no help to anyone trying to have updates from one thread be presented to the use in a window being shown from another thread.

Pete
.



Relevant Pages

  • Re: a *working* PostThreadMessage() implementation...?
    ... This way it won't be lost. ... message pump be aware of it, ... It's not enough for only the window to be invisible. ... entire thread must not display any visible GUI. ...
    (microsoft.public.vc.mfc)
  • Re: a *working* PostThreadMessage() implementation...?
    ... This way it won't be lost. ... message pump be aware of it, ... It's not enough for only the window to be invisible. ... entire thread must not display any visible GUI. ...
    (microsoft.public.vc.mfc)
  • Re: SVGA, LCD, Win CE 6.0 and PB
    ... site addressing display drver issues, not to mention the source code. ... travel down thru Win CE from boot.ini to the place genrating final LCD ... I can have a desktop larger than physical screen window. ...
    (microsoft.public.windowsce.platbuilder)
  • Question about Full screen exclusive mode
    ... I use ScreenManager class that has been presented in David Brackeen's book. ... The graphics card enters the selected mode but the window content is painted only to the level of windows display mode.For example. ... After returning to the Windows, the settings dialog window is repainted with the content of the frame that is under settings dialog. ...
    (comp.lang.java.programmer)
  • Re: display array in a frame wnd
    ... I have to display results. ... The window can be used in all the program thanks to the name "source image". ... CFrameWnd* pw; ... Why is this not in an OnPaint handler? ...
    (microsoft.public.vc.mfc)