Creating custom window with SDL

Hello

the following code :

Code:
SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE | SDL_NOFRAME );

create a standard square black window with no frame.

i want to create a custom shape window (not a square window or a transparent window) with sdl, i couldn’t find out how to make that. that seems to be possible with win32 api, however i need to do it in sdl.

can anyone help me please ?

thank you

You can fetch the windows window information (window handle, etc) from SDL using SDL_GetWMInfo (http://www.libsdl.org/cgi/docwiki.cgi/SDL_GetWMInfo)

Dunno if there’s an equivalent function for SDL 1.3, but it should be in the compatibility layer anyway.

thanks for this help

no much documentation on SDL_GetWMInfo, i’m not sure how to use it [Embarassed]

let me guess, SDL_GetWMInfo allow to get win32api handle, then should use some win32api code to make window transparent ?

isn’t there a better way to do that in sdl ?

2009/11/1 Xzod

thanks for this help

no much documentation on SDL_GetWMInfo, i’m not sure how to use it [image:
Embarassed]

let me guess, SDL_GetWMInfo allow to get win32api handle, then should use
some win32api code to make window transparent ?

isn’t there a better way to do that in sdl ?

This is a planned feature for SDL 1.3, but not yet implemented.
I believe the idea is to have an alpha channel on the window itself, but I’m
not sure how that works if you’re using the renderer API rather than
surfaces.

ok thank you for this information