• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • Last Modified:

Zoom (scale) a Window

I would like to find some sample 'C' (not C++) code that shows how to zoom and center a drawing in a Win95/98/NT app in 'C' using the Win32 API.  

I'm using SetMapMode and the associated windows and viewpoint org and ext functions.  I need to be able to click on a point in a drawing and center it (or scroll it) as well as scale it larger and smaller.  I managed to get the zoom code working, but I can't figure out how to center the selected point in the window and when I zoom larger, the drawing goes out of the window..  
1 Solution
arvidqAuthor Commented:
Thanks for the pointer.  I don't know why my search of MSDN didn't find this sample, but it may be because I searched on ZOOMING instead of ZOOMIN.  Also, this example doesn't use SetMapMode and the related functions, but on first glance, it does look like it will work.  I'll be implementing it very soon.

Thanks again.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now