Distorted image in MFC

Hello,
I am trying to program a sort of a game that is played on a grid. While drawing the grid, if I choose the origin (0,0), the drawing is OK, but if I shift the origin to some other points, the image is distorted and the gridlines do not all meet at a point (and there forms a triangle instead of all lines meeting at a point). This is what happened when I used LineTo function.

I created the image from the resource editor and the image is still distorted somewhat but yet usable.

What is the better method to draw the image, to use lineto (or other functions) or resource editor? The grid image is stationary and there is nothing else to do with it after drawing it but I need the co-ordinates of all the grids. If I use the resource image, how do I find the grid co-ordinates?

Also, if I use CPaintDC, the image is fine, but if I use CWindowDC (to make fullscreen), the image flickers very much. I used memory mapped image, using CreateCompatibleDC, but that does not help either.

Thanks


Any reason why you are using MFC, its quite old and more difficult to get things done.

Why not try a library such as SDL: https://www.libsdl.org/

There are other libraries out there, SDL is one of the more common ones.
its quite old

it was updated last October.
It's a venerable technology to be sure, much maligned by the whelps.


-----===#===-----

kdhakal,

I'm not sure there is enough information there for anyone to be able to help you.
Last edited on
Topic archived. No new replies allowed.