HGLRC hRC; HDC hDC; //use OpenGL CDC *pcDC=windowcontrol.GetDC(); // Store the device context hDC=pcDC->GetSafeHdc(); // Select the pixel format SetDCPixelFormat(hDC);//user defined // Create the rendering context and make it current hRC = wglCreateContext(hDC); wglMakeCurrent(hDC, hRC); draw();//user defined SwapBuffers(hDC);
HDC hDC;
//use OpenGL
CDC *pcDC=windowcontrol.GetDC();
// Store the device context
hDC=pcDC->GetSafeHdc();
// Select the pixel format
SetDCPixelFormat(hDC);//user defined
// Create the rendering context and make it current
hRC = wglCreateContext(hDC);
wglMakeCurrent(hDC, hRC);
draw();//user defined
SwapBuffers(hDC);