What function do i use for achieving zoom in and out in apps?

i want to have a program that when i am reading a page on IE or pdf file, that it can automatically zoom in a certain amount or can increment zoom in by 1% each time.
IE and PDF readers have built-in zoom functionality, you shouldn't have to write your own.

Anyway...there isn't a zoom function. Zooming effects are done by redrawing the original data at a different size. To do this, you need to scale up the image (assuming it's an image) and maybe apply some kind of antialiasing filter to prevent it from looking awkward. Or if the data is text, you can simply render the text in a larger point.

If you're trying to zoom in a separate program the concept is the same. You just have to get the image data from the program somehow (maybe FindWindow or something -- I never actually got into this kind of thing) then scale it up and redraw it. Although whether or not the program will like you redrawing on its window is another matter. This could get pretty tricky.
sounds like alot of work... ermmm... is there any way that can retrieves the program's zoom in and out function and simulate the actual clicking on the zoom in or out in my program?

eg if the IE's zoom in is "Ctrl +". can i retrive its shortcut for that and implement in my program to make it automatic?
Last edited on
There's no way to find out of a particular program has zoom featueres let alone the shortcut key for it. So no.

You can, however, assume the shortcut keys (or have it user defined) and send those to the program to do it automatically.

iirc, you get get the HWND with FindWindow or another window searching function, and send the window key messages with PostMessage(), which in turn should trigger the shortcut.

In theory, anyway. I don't know whether or not it would work. I'm not sure how Windows handles shortcuts -- it might not work this way.
Btw, Windows has a feature that magnifies the area around the cursor for you.
firedraco - duh, of course i know that. i f i didnt know that i would have asked in windows forum and not a c++ forum.

Disch - thanks i will see if your way works. THANKS
Embed IE or Acrobat (COM) and zoom it like you want
ask google
O(∩_∩)O~
Topic archived. No new replies allowed.