RE: [GD-Windows] Windows paints my window!
Brought to you by:
vexxed72
From: Brian S. <bs...@mi...> - 2002-09-09 20:35:49
|
Who said you have to actually process the messages? :) From MSDN: IsHungAppWindow You call the IsHungAppWindow function to determine if=20 Windows considers that a specified application is not=20 responding, or "hung". An application is considered to=20 be not responding if it is not waiting for input, is=20 not in startup processing, and has not called PeekMessage=20 within the internal timeout period of 5 seconds. http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/winui/= W inUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowFuncti ons/IsHungAppWindow.asp Call PeekMessage when you update your progress bars and all should be well. --brian > -----Original Message----- > From: Javier Arevalo [mailto:ja...@py...]=20 > Sent: Monday, September 09, 2002 1:17 PM > To: gam...@li... > Subject: Re: [GD-Windows] Windows paints my window! >=20 >=20 > Tom Forsyth <to...@mu...> wrote: >=20 > >> I thought that setting the hbrBackground of the > >> WNDCLASS struct to NULL was enough to prevent this > > > > IIRC, you need to set it to a transparent brush, not just to NULL. >=20 > I didn't find explicit mentions of a transparent brush, but I guess > BS_HOLLOW will do: >=20 > LOGBRUSH lb =3D { BS_HOLLOW }; > wcex.hbrBackground =3D (HBRUSH)CreateBrushIndirect(&lb); >=20 > Hopefully this will do the trick. >=20 > > But beware of other nasty things that happen when you neglect your > > message > > pump. It might be an idea to call the message pump regularly during > > the > > loading process. You can also draw progress bars, etc at the same > > time - keeps both Windows and the user from worrying. >=20 > Yeah we have a progress bar but we don't call the message=20 > pump, just update > the screen. I'm concerned about letting messages interfere=20 > with the loading > process. We support surface/vb loss & restoration allright,=20 > as well as all > incarnations of Ctrl-Alt-Del we have figured out (we only got=20 > one rare case > where the three-finger salute will BSOD Win2k), plus mission=20 > loading with > the device lost (app minimized). However, I wonder how stable=20 > can I get this > thing if I allow a device loss in the middle of reloading=20 > surfaces & such > (easy to get into reentrancy trouble I guess). >=20 > Thanks, I'll post if / when this is solved. >=20 > Javier Arevalo > Pyro Studios |