MFC嵌入方法:
SDL_Window* SDL_CreateWindowFrom(const void* data);
API详细介绍:
Use this function to create an SDL window from an existing native window.
http://wiki.libsdl.org/SDL_CreateWindowFrom
示例:
SDL_CreateWindowFrom((void *)GetDlgItem(IDC_STATIC)->GetSafeHwnd());
Qt嵌入方法:
char variable[64];
#ifdef Q_OS_WIN
sprintf(variable, "SDL_WINDOWID=0x%lx", videoWidget->winId());
#else
sprintf(variable, "SDL_WINDOWID=0x%lx", this->winId());
#endif
printf("SDL_WINDOWID = %s \n",variable);
SDL_putenv(variable);
SDL的学习还是参考雷神的博客吧
http://blog.csdn.net/leixiaohua1020/article/details/40701203