[SDL] SDL & MFC
Sam Lantinga
slouken at devolution.com
Fri Oct 4 22:53:01 PDT 2002
> Hello,
> I am looking for information on how to setup SDL to display in the client
> area of an MFC app.
> I am using SDL in a DLL to display images. It works fine in my win32
> project, but now I need it to work in an MFC app.
> I have attempted to use SDL_WINDOWID but it does not seem to work. I still
> get a windowed SDL surface separate from the main app. Here is the code I
> use before I init SDL and set the video.
> char buff[100];
> char buff2[100];
> sprintf(buff,"%s","SDL_WINDOWID=");
> sprintf(buff2,"0x%08x%",m_pMainWnd->GetSafeHwnd());
Did you mean to put the second %?
As far as I can tell you're doing the right thing. Can you debug the SDL
library to make sure it's seeing the environment variable?
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
More information about the SDL
mailing list