SFML community forums

Help => Window => Topic started by: Qix on September 25, 2012, 04:22:29 am

Title: OpenGL on layered window
Post by: Qix on September 25, 2012, 04:22:29 am
Is it possible to set the native windows window to WM_LAYERED and draw on the window transparently? As in, clearing the window with a transparent color.
Title: Re: OpenGL on layered window
Post by: Laurent on September 25, 2012, 08:10:39 am
Nop.

But you do it on your side: get the window handle (window.getSystemHandle()), and call SetWindowLong with GWL_EXSTYLE.
Title: Re: OpenGL on layered window
Post by: Qix on September 25, 2012, 11:52:53 am
And that will allow me to draw on a transparent window?
Title: Re: OpenGL on layered window
Post by: Laurent on September 25, 2012, 11:57:34 am
I don't know how window transparency works. I thought you did, and just asked for a way to set the WM_LAYERED style ;)

So you should first read how window transparency works, and then see what problems need to be solved so that you can do it with a SFML window.
Title: Re: OpenGL on layered window
Post by: Qix on September 25, 2012, 01:20:11 pm
Ohhh I see what you mean. I'll give it a try; I've done graphics with transparent windows before using the native HDC system on Windows, but I didn't know if it was possible using OpenGL applications and such.

I'll give a try and let you know, Laurent ;)