title: Update SDL1.2 SDL_GetWMInfo to SDL2 SDL_GetWindowWMInfo
body: <p>I'm trying to update some C++ code in a custom version of DOSBox from SDL1.2 to SDL2. The lines that have me baffled are these:</p>
  
  <pre><code>SDL_SysWMinfo systemInfo; 
  SDL_VERSION(&amp;systemInfo.version);
  
  if(SDL_GetWindowWMInfo(window, &amp;systemInfo) !=1) return;
  if (!::OpenClipboard(systemInfo.info.win.window)) return;
  </code></pre>
  
  <p>SDL_GetWindowWMInfo is defined in SDL_syswm.h this way:</p>
  
  <pre><code>typedef struct SDL_SysWMinfo SDL_SysWMinfo;
  extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window, SDL_SysWMinfo * info);
  </code></pre>
  
  <p>When I try to build in Visual Studio 2010, I get this error, thrown by the third line in the code above:</p>
  
  <pre><code>1&gt;  sdlmain.cpp
  1&gt;..\src\gui\sdlmain.cpp(2966): error C2065: 'window' : undeclared identifier
  </code></pre>
  
  <p>I think the answer is here:</p>
  
  <p><a href="https://gamedev.stackexchange.com/questions/82068/how-can-i-obtain-a-window-handle-in-sdl-2-0-3">https://gamedev.stackexchange.com/questions/82068/how-can-i-obtain-a-window-handle-in-sdl-2-0-3</a></p>
  
  <p>but I'm a beginner and can't figure out how to adapt that to my own code. If anyone is willing to help out a complete beginner, I'll be grateful.</p>