I’d like to get a HWND reference to the SDL Window when running under Windows, so I can put a menu bar in it.
I’m using the sample code here:
http://wiki.libsdl.org/moin.cgi/SDL_GetWindowWMInfo
But I get a compile error “error C2039: ‘win’ : is not a member of ‘SDL_SysWMinfo’”
Any ideas what I’m doing wrong? Yes, this is when compiling on Windows.
Code:
#include “SDL_syswm.h”
void initMMMenuBar(void )
{
SDL_SysWMinfo windowInfo;
SDL_VERSION(&windowInfo.version);
SDL_GetWindowWMInfo( gSpriteWorldP->mainWindow, &windowInfo );
… // unrelevantcode to create menu bar goes here…
SetMenu(windowInfo.win.window, hMenu); // COMPILE ERROR HERE: no win.window field