title: Get window handle of SDL 2 application
body: <p>I would like to get the handle of a SDL2 window, to use it with WinApi.</p>
  
  <p>I retrieve that handle with the following code :</p>
  
  <pre><code>/* All the SDL initalisation... */
  SDL_Window* window = SDL_CreateWindow("My Window", SDL_WINDOWPOS_UNDEFINED,
                          SDL_WINDOWPOS_UNDEFINED, RESX, RESY, SDL_WINDOW_SHOWN);
  SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
  if (window == NULL || renderer == NULL) {
      MessageBox(NULL, L"SDL initialisation error", NULL, MB_OK);
      exit(-1);
  }
  
  SDL_SysWMinfo wmInfo;
  SDL_GetWindowWMInfo(window, &amp;wmInfo);
  HWND hwnd = wmInfo.info.win.window;
  </code></pre>
  
  <p>But at this point, <code>hwnd</code> adress is <code>0xcccccccc</code> (unused).</p>
  
  <p>Did I do something wrong?</p>