|
![](/i/fill.gif) |
Oops, that was stupid of me. I posted it in p.b.i by mistake :/ Anyway...
Yesterday I literally spent hours looking for a way to make an SDL
window the child of a regular window. I saw many posts regarding the
impossibility of doing it, or how, if you were able to make it happen,
then it was probably a hack which made it possible.
And so I took off on the premise that it was going to be some difficult
thing to accomplish, me having never programmed a proper gui in my life,
or even created an application with child/parent windows for that
matter. (I'm still fairly new to C++ programming, and really haven't
logged too many hours in yet, but I drink coffee like a true
programmer). After a long, frustrating ordeal involving one source file
which couldn't recognize the window handle from the first source file, I
finally merged both sources into one file. I was then beset with crashes
until, finally, I saw my SDL window pop up and stay there, sans window
frame which the tutorial I was reading claimed should be there. I then
learned that I didn't need to follow all that hackish advice, for all I
needed to do in the first place was initialize the regular window and
drop the SDL code on top of that, which created a new window (with a
frame), without the need to code a whole new Win32 window!
This is probably all pretty boring to you, but if you made it this far
then I have a question to ask. Is what I did in the end really kosher?
All the loose ends are tied up, so there probably won't be any memory
leaks... but will this application crash if somebody is, say, running
Windows 95 or NT?
I really want to launch some apps soon. I've got a CA-based interlocking
stones generator which might be useful :)
Sam
Post a reply to this message
|
![](/i/fill.gif) |