SDl embed in a (win32) windows

i wonder if anyone has ever embeded SDL in a win32 windows, given a
HWND handhle ?
could you send me code exemple, please ?
or advice ?
any help would be welcome !..

hum, if someone know, i alread wonder, is there a special event
management in such windows or do i use SDL event management ?

“Lloyd Dupont” <Lloyd.Dupont at wanadoo.fr> schrieb im Newsbeitrag
news:20010716144632.0FF4B1E4A2 at coloss.paris.ukibi.com

i wonder if anyone has ever embeded SDL in a win32 windows, given a
HWND handhle ?
could you send me code exemple, please ?
or advice ?
any help would be welcome !..

hum, if someone know, i alread wonder, is there a special event
management in such windows or do i use SDL event management ?

You could do a “workarround” if you would move the sdl-win arround , but in
my humble opinion this is not possible… ;-(

Greetings…
PeZ

i wonder if anyone has ever embeded SDL in a win32 windows, given a
HWND handhle ?
could you send me code exemple, please ?
or advice ?
any help would be welcome !..

hum, if someone know, i alread wonder, is there a special event
management in such windows or do i use SDL event management ?

Though I haven’t done this personally, the WINDOWID hack should allow you
to do this. According to the source:
.
.
.

SDL_windowid = getenv(“SDL_WINDOWID”);

    .
    .
    .

if ( SDL_windowid ) {
SDL_Window = (HWND)strtol(SDL_windowid, NULL, 0);
} else {
SDL_Window = CreateWindow(SDL_Appname, SDL_Appname,
.
.
.

So that should do the trick. Just create your own child window and do a
setenv(SDL_WINDOWID, your_window_id). Though I’m not sure about the
ramifications of doing this as far as events are concerned. Check the
mailing list archive, you’ll probably find the relevant info.

DaveOn Mon, 16 Jul 2001, Lloyd Dupont wrote:

David MacCormack
@David_MacCormack

“David MacCormack” wrote

if ( SDL_windowid ) {
SDL_Window = (HWND)strtol(SDL_windowid, NULL, 0);
} else {
SDL_Window = CreateWindow(SDL_Appname, SDL_Appname,

i can see a possible bug just glancing at the two files.
it looks to me like the “dib” version properly handles the
DestroyWindow call by checking the value of SDL_windowid.
meanwhile in the “dx5” version it blindly destroys the window
without checking this value?

David MacCormack wrote:

i wonder if anyone has ever embeded SDL in a win32 windows, given a
HWND handhle ?
Though I haven’t done this personally, the WINDOWID hack should allow you
to do this. According to the source:
SDL_windowid = getenv(“SDL_WINDOWID”);
heing ???
getenv() is for environment variable, i am lost, what is the link ?

if ( SDL_windowid ) {
SDL_Window = (HWND)strtol(SDL_windowid, NULL, 0);
} else {
SDL_Window = CreateWindow(SDL_Appname, SDL_Appname,
??
anyway : “CreateWindow” is a good idea. i browse the source of SDL
and found a interesting function using it.
thanks for this idea.> On Mon, 16 Jul 2001, Lloyd Dupont wrote: