title: Painting Text above OpenGL context in MFC
body: <p>I work on an MFC app containing OpenGL context.I am new to MFC that is why I am asking it.OpenGL works fine ,but when I want to draw a text above the 3D window using this code inside WindowProc:</p>
  
  <pre><code>        case WM_PAINT:
  
        hDC=BeginPaint(window,&amp;paintStr);
        GetClientRect(window,&amp;aRect);
        SetBkMode(hDC,TRANSPARENT);
        DrawText(hDC,L"He He I am a text on top of OpenGL",-1,&amp;aRect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);
        EndPaint(window,&amp;paintStr);
  
        return 0;
  </code></pre>
  
  <p>it is shown beneath the OpenGL context.I can see it only when resizing the window as the OpenGL rendering pauses than. </p>