The best way to do it is implementing some vector graphics. You can do it from scratch. In this case, your zoom won't show any
pixellation, will be rendered from the model directly on screen. The idea is to handle the Windows message WM_PAINT where you render the graphics each time it is requested. Windows messages system has special provision to optimize pumping of this specific message. For example, if you invalidate some region before all messages are handler, only the last message is handler, and all invalidation are ORed together.
That said, the system does not store the graphics you output. This is the example of
inversion of control, when you supply a handler which is called when the graphics is requested to be re-drawn, fully or partially. This mechanism is called
invalidation. Therefore, you have to store some data in your code, and this data should be the data structure representing your vector graphics: collections of data objects representing lines, rectangles, ellipses, colors, and so on. You develop one universal method drawing all this data on some graphic context object.
Please see:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd145213%28v=vs.85%29.aspx[
^],
https://msdn.microsoft.com/en-us/library/windows/desktop/dd162759%28v=vs.85%29.aspx[
^],
see also:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd162761%28v=vs.85%29.aspx[
^].
When your model is changed in some part, use one of invalidation functions:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd145002%28v=vs.85%29.aspx[
^],
https://msdn.microsoft.com/en-us/library/windows/desktop/dd145003%28v=vs.85%29.aspx[
^].
Now, what is that change? It could be logical change, such as adding, removing or transforming some of those objects of your model. Another class of changing is the "point of view": zoom level, pan parameters, I would even add rotations, and even more: set of layers to show or to hide. All these changes require appropriate invalidation, but "point of view" changes require full invalidation of all scene (window of your rendering control).
So, you have to have two levels of the model: "semantic", "logical" — graphics itself, and "point of view" data: current zoom level, angle, and so on. Change anything and then invalidate whatever you have to. That will lead to the call of your WM_PAINT handler, which is universal, renders all your graphics with all the parameters.
See also my past answer:
MFC Drawed lines is disappeared[
^].
(Please see it even if you are not planning to use MFC.)
—SA