Re: [GD-Windows] Windows paints my window!
Brought to you by:
vexxed72
From: Javier A. <ja...@py...> - 2002-09-09 20:14:33
|
Tom Forsyth <to...@mu...> wrote: >> 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. I didn't find explicit mentions of a transparent brush, but I guess BS_HOLLOW will do: LOGBRUSH lb = { BS_HOLLOW }; wcex.hbrBackground = (HBRUSH)CreateBrushIndirect(&lb); Hopefully this will do the trick. > 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. Yeah we have a progress bar but we don't call the message pump, just update the screen. I'm concerned about letting messages interfere with the loading process. We support surface/vb loss & restoration allright, as well as all incarnations of Ctrl-Alt-Del we have figured out (we only got one rare case where the three-finger salute will BSOD Win2k), plus mission loading with the device lost (app minimized). However, I wonder how stable can I get this thing if I allow a device loss in the middle of reloading surfaces & such (easy to get into reentrancy trouble I guess). Thanks, I'll post if / when this is solved. Javier Arevalo Pyro Studios |