title: Is it possible to create a GetOpenFileName dialog in a fullscreen app?
body: <p>I have a fullscreen application wrtten in C++ and would like to open a dialog window so the user can select a file to be opened without the app breaking out of fullscreen mode.</p>
  
  <p>On Windows, to run in fullscreen mode, I call <code>ChangeDisplaySettings(&amp;settings, CDS_FULLSCREEN)</code>. (Technically, I am using SDL, but this is the call it uses.)</p>
  
  <p>To open the file dialog, I use the following code:</p>
  
  <pre><code>HWND hWnd = NULL;
  SDL_SysWMinfo wmInfo;
  SDL_VERSION(&amp;wmInfo.version);
  if( SDL_GetWMInfo(&amp;wmInfo) ) {
      hWnd = wmInfo.window; // Note: This is sucessful, and hWnd != NULL
  }
  
  OPENFILENAMEW ofn;
  wchar_t fileName[MAX_PATH] = L"";
  ZeroMemory(&amp;ofn, sizeof(ofn));
  
  ofn.lStructSize = sizeof(OPENFILENAME);
  ofn.hwndOwner = hWnd;
  ofn.lpstrFile = fileName;
  ofn.nMaxFile = MAX_PATH;
  ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST;
  
  if( GetOpenFileNameW( &amp;ofn ) ) {
      DoSomethingWith( fileName );
  }
  </code></pre>
  
  <p>When run, hWnd is not NULL, but when this dialog is created, it shifts the window focus to the dialog, which breaks out of the fullscreen app, similar to alt-tabbing to another window while in fullscreen. Once the file is selected and the Open File dialog closes, I have to manually switch back to the fullscreen app.</p>
  
  <p>Is it possible to do what I want using existing Windows dialogs, or do I have to write my own in-app file browsing system or run in windowed mode only?</p>