Win32 C++; How to use mouse wheel to zoom in and zoom out of picture in the client area of the application window?

  • Thread starter Thread starter Purple_Apple
  • Start date Start date
P

Purple_Apple

Guest
Hello. Sorry that I constantly flicker in the forum. If possible, please give a link to the material, which describes in detail how to zoom in or zoom out the image in the application window, using the mouse wheel for this. I've been googling for two hours, but I can’t find an article that describes it well. There are quite a few descriptions of how to implement such scaling on the .NET Framework C #, but I need a description of how this is done on Win 32 C ++. Regarding the implementation of this in C ++, there is little information. For example, I googled this: Scaling an Image - Win32 apps But there is not used, for scaling, the mouse wheel (true, I have not yet read carefully this article. I will look at it). Or some fragmentary information comes across. For example, this: Zooming into a window based on the mouse position Or this one: WM_MOUSEWHEEL message (Winuser.h) - Win32 apps Well and so on like that, I will not list. But there is no article that would describe in detail how to zoom in or zoom out the image in the client area of the Win 32 API C ++ application window by rotating the mouse wheel. For example, I would like to make it in my application so that the user can, by rotating the mouse wheel, increase or decrease the image of the triangulation mesh.

1599537.png

A triangulation mesh here represents a set of lines, each of which is drawn using GDI+ Graphics.DrawLine() function.

Therefore, if possible, please give a link to an article that describes in detail the process of reducing or enlarging a picture in the client area of a Win 32 C ++ application window by rotating the mouse wheel. Well, or an example of C ++ source code that implements this. It will generally be happiness. I would be very grateful for your help.

Continue reading...
 
Back
Top