static PIXELFORMATDESCRIPTOR DesiredPFD =
    {
        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
        24,                             // 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
        32,                             // 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
    };

    //Find the best avaialbe Pixel-Format 
    //that closely matches the desired one
    int BestAvailablePixelFormat = ChoosePixelFormat(m_hDC, &DesiredPFD);
    if(!BestAvailablePixelFormat) return false;

    //Set this Pixel-Format to the Device-Context
    BOOL Result = SetPixelFormat(m_hDC, BestAvailablePixelFormat, &DesiredPFD);