I wrote a pretty big graphics program a while back that uses CDC for drawing.

I wanted to do some 3D stuff among dozens of other things so, i installed OPENGL in replace of my CDCs

I have more everything ironed out and its working great for the most part.

My mouse points and any other point (example - ::OnMouseMove(nFlags, point)) are not 100% matching up with what OPENGL draws.

For example, if you want to draw a line the further you go out from point 0,0 the bigger the difference in the mouse point and where it draws when you click.

So if you draw a long from 0,0 to say 200,200 then it seems to draw properly. However, the more i zoom out the more the difference is visible.

Im assuming its in my projection.... i really don't know. Im not sure what code to give you.

Note, my ASPECT is 1 because i need to be able to change the size of the window and i don't want the image to lose that same aspect.


// Make the rendering context current

// Reset The Current Viewport And Perspective Transformation
glViewport(0, 0, cx, cy);

m_height= cy;
m_width = cx;

// Calculate The Aspect Ratio Of The Window