SDL & wxWindows&SDL_WINDOWID on Windows

I’m tryed to use SDL with wxWindows on Windows. It works fine with the
SDL_WINDOWID when SDL and WX are seperated running programs. But when I try
to implement it as a singel program ( initialize SDL from WX), sdl opens
his own window :frowning:

Any experiances, examples ??–
Using M2, Opera’s revolutionary e-mail client: http://www.opera.com/m2/

ho_s at gmx.net wrote:

I’m tryed to use SDL with wxWindows on Windows. It works fine with the
SDL_WINDOWID when SDL and WX are seperated running programs. But when I
try to implement it as a singel program ( initialize SDL from WX), sdl
opens his own window :frowning:

Any experiances, examples ??

I havent used wxWindows yet, although I plan to. The only suggestion I
can think of is to use wxWindows to create and handle your windows and
use SDL to create your surfaces and create one surface the size of your
window and blit it to the real window. You might have to write your own
blit function. Of course, there is also the option of hacking wxWindows
or SDL to allow one or the other to work nicer together. I don’t know
how it’d work, but there is a chance you could create an SDL_Surface
structure which could directly access the wxWindow’s surface. If you can
get the surface directly from the window, then create the SDL_Surface
with a format identical to the window’s surface and manual set the
height, width, and pixel pointer. SDL might not like it, but its possible.

@Martin_Cz wrote:

I’m tryed to use SDL with wxWindows on Windows. It works fine with the
SDL_WINDOWID when SDL and WX are seperated running programs. But when I
try to implement it as a singel program ( initialize SDL from WX), sdl
opens his own window :frowning:

Any experiances, examples ??

I havent used wxWindows yet, although I plan to. The only suggestion I
can think of is to use wxWindows to create and handle your windows and
use SDL to create your surfaces and create one surface the size of your
window and blit it to the real window. You might have to write your own
blit function. Of course, there is also the option of hacking wxWindows
or SDL to allow one or the other to work nicer together. I don’t know how
it’d work, but there is a chance you could create an SDL_Surface
structure which could directly access the wxWindow’s surface. If you can
get the surface directly from the window, then create the SDL_Surface
with a format identical to the window’s surface and manual set the
height, width, and pixel pointer. SDL might not like it, but its
possible.

Thx, that’s a great idea. The simple things are the best :-)On Sun, 09 Feb 2003 11:14:52 -0500, Calvin Spealman wrote:


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Using M2, Opera’s revolutionary e-mail client: http://www.opera.com/m2/