Advertisement

SDL in a little box

Started by July 11, 2004 04:53 PM
5 comments, last by GameDev.net 20 years, 4 months ago
Im writing a little program that needs SDL to be in a little box in the corner, so im wondering how id go about using windows programming to make diolog with it? -- Jake
Um, simply put, you can't. SDL is supposed to be OS independant, so it either has full control or doesn't work at all. So either find a way to rewrite your program to use SDL all the way, or use DirectX, or the GDI to do whatever you have to do. sorry, that's just the way it is.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
Advertisement
I saw a post a while ago that told you how to make a widows menu in sdl so PnP im sorry to say your wrong. Now to the OP Im not at all sure how you would do that....
______________________________________________________________________________________With the flesh of a cow.
Hey,

ok, I'm not sure I know totally what you mean, but:
make sdl window
get window handle using FindWindow
make new window
set SDL window as a child of new window
resize or whatever your new SDL child window

or you could totally cheat, and create your SDL window and your new one, and whenever someone moves the normal window, reposition the SDL window, and when they minimize the normal window, minimize the SDL window etc.

If I've misunderstood, just ask again :)
Thanks MoreOn, I like the way you think, thats probibly what i'll do, but failing that ill probibly have to fall to DirectX :(

-- Jake
That would probably work. I don't know enough about SDL on Windows, but you could probably just take the DirectDraw object it creates and embed it in a window (if it works the same as OpenGL objects under OS X...)
Advertisement
There's a function called SDL_GetWMInfo which returns a pointer to a struct containing os specific information like window handles. Take a look at the SDL header files ( SDL_syswm.h I think ).

This topic is closed to new replies.

Advertisement