[SDL] Using SDL from within an Windows MFC application

Stephen Anthony stephena at roadrunner.nf.net
Sat Nov 1 08:26:00 PST 2003

On Saturday 01 November 2003 12:49 pm, Neil Brown wrote:
> >So my more specific questions are:
> >
> >1) Can these subsystems be opened and closed multiple times per
> > program invocation *in SDL under Windows*?
> In my latest project, I call SDL_Init and SDL_Quit multiple times,
> even just to open a window for defining keys, and the app does not
> quit entirely when SDL_Quit is called, just that the window is
> closed.  So yes (this is under Windows btw) to that one.
> >2) Can SDL_Init() be called multiple times per program invocation in
> > SDL under Windows?  And what will happen once SDL_Quit() is called
> > within an application?  Does the whole application quit, or does
> > the current SDL window close and processing can continue?  If
> > processing can continue, will the underlying Windows application
> > still get events?
> See above.  After I'd quit, I called "show" (Im using wxWindows so it
> might not be the native call name) on my main menu-type window, and
> processing continued under that, so I think yes to all of those as
> well.

Great, that's what I wanted to hear :)  Right now, the launching is as 
follows (in pseudocode):

MFC ::hide();
DirectX emulation ::run();
MFC ::show();

So that last show() is what you're talking about.  If this works, I can 
have the emulator working in hours, vs. days (weeks?) if using DirectX 

Now my only problem is figuring out how to compile and link an SDL 
application in Visual Studio .NET.  Anyone have any info on this one?


More information about the SDL mailing list