PDA

View Full Version : Fullscreen exit under Win98/NT4



marcus256
01-08-2003, 05:24 AM
I have been bothered by an annoying bug for some time now: When my fullscreen window is closed and the desktop mode is restored, the application taskbar icon does not disappear until I press it.

This only happens under Win98 and NT4 (perhaps 95 and/or ME too?). Under Windows 2000 I have no such problems.

I suspect this is a bug in Windows that can be worked around somehow, for instance by changing the order in which resources are freed and the video mode is restored.

Here is how I do it:

1) Delete GL rendering context
2) Release device context (DC)
3) Destroy window
4) Unregister window class
5) ChangeDisplaySettings(NULL,CDS_FULLSCREEN)

Perhaps I should change the order somehow, and wait for some kind of notification??

marcus256
01-08-2003, 05:39 AM
Update: It seems to work (under Windows NT 4) if I insert ShowWindow(hWnd,SW_HIDE) directly before calling DestroyWindow(hWnd).

Could someone please comment on this? Is it a general solution, or just a fluke?

PH
01-08-2003, 05:48 AM
I do this,

wglMakeCurrent( NULL, NULL );
wglDeleteContext( hRC );
ChangeDisplaySettings( NULL, 0 );
// Destroy window

I don't actually call ReleaseDC since I create windows for GL using the CS_OWNDC flag.

I haven't tested this under NT but it works in windows 2000.

Edit: Oh, and it works in 98 too.

[This message has been edited by PH (edited 01-08-2003).]