PDA

View Full Version : OGL fullscreen + Winamp Problem



playREV
05-24-2004, 08:58 AM
Hi!

This may sound a little bit stupid to you, but while developing a simple application in VC++ / OpenGL (running windows XP) I'm unable to open a fullscreen window that can be placed above the Winamp then it is running with the "always on top" option on. I'm experiencing 2 different kinds of situations:

1 - Winamp is always placed above my fullscreen window.
2 - Both applications appear to fight to obtain the topmost Z-order position and I see flicker (similar to z-buffer fighting).

The problem is only with winamp, because everything runs fine with other "always on top" applications. I'm using the version 5.03 of Winamp, but it happens with any other version.

Sometimes this happens when I initialize the application but it also happens then I loose focus with alt+tab combination and try to enter the application again.

I have tried everything I can without any good results...

ShowWindow();
BringWindowToTop();
SetActiveWindow();
SetForegroundWindow();
SetWindowPos()

Obviously I'm using the WS_EX_TOPMOST extended style and WS_POPUP style when creating the window.
I have also tried capture some messages in the WindowProc like the WM_SETFOCUS and WM_ACTIVATE but again without any success.

Hope anyone can help me,
Thanx.

kehziah
05-25-2004, 12:46 AM
I'm inclined to think that it really is a Winamp problem. I have the fighting problem you mention when Winamp is "always on top" and I launch Warcraft 3. As far as I can tell, Warcraft 3 is very clean regarding minimizing, alt-tabbing and all, but still has a problem with Winamp.

A user also reported this kind of behaviour with my application (a winamp plug-in). I think the safest bet is to send a Minimize message to Winamp before entering fullscreen mode, and send Restore upon exit.

playREV
05-25-2004, 06:12 AM
Hi, kehziah!
Thanks for your reply. I didn't know that warcraft 3 had the same problem, but I know that almost all of the source code available as a tutorial on "how to init an opengl window" suffers from the same evil...

I'll try to do what you suggested if I can't get around it without mess with de positions of other applications (I don't even know how to do that).

Right now I'll keep cleaning my code a bit and trying to solve this nasty problem. I'm almost done, 'cause the application starts fine now, but the problem remains then alt+tabing.

Iíll post the solution if I manage to fix it.

Cheers,
playREV.