title: My OpenGL game switches Aero DWM Glass off
body: <p>I wrote a free game a few years ago: <a href="http://www.walkover.org" rel="nofollow noreferrer">http://www.walkover.org</a>. For the lobby and menus, it uses normal dialogs like win32. When the actual game starts it uses OpenGL. </p>
  
  <p>Now, on Windows 7, when the actual game starts, it switches windows aero glass off and switches it back on when the game is over. </p>
  
  <p>Is there something I can do to prevent this from happening? Some special flags that keep the glass on if it is on? (For newer, I have been using DirectX and this doesn#t happen there.) Maybe some (new) flag I have to specify somewhere?</p>
  
  <p>I'm using this pixelformatdescriptor:</p>
  
  <pre><code>    static PIXELFORMATDESCRIPTOR pfd =
      {
          sizeof(PIXELFORMATDESCRIPTOR),  // size of this pfd
          1,                              // version number
          PFD_DRAW_TO_WINDOW |            // support window
            PFD_SUPPORT_OPENGL |          // support OpenGL
            PFD_DOUBLEBUFFER,             // double buffered
          PFD_TYPE_RGBA,                  // RGBA type
          32,                             // 24-bit color depth
          0, 0, 0, 0, 0, 0,               // color bits ignored
          0,                              // no alpha buffer
          0,                              // shift bit ignored
          0,                              // no accumulation buffer
          0, 0, 0, 0,                     // accum bits ignored
          0,                              // 32-bit z-buffer
          0,                              // no stencil buffer
          0,                              // no auxiliary buffer
          PFD_MAIN_PLANE,                 // main layer
          0,                              // reserved
          0, 0, 0                         // layer masks ignored
      };
  </code></pre>