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

Zooming a Window !

I have created a Static Control via the "CreateWindowEx" API function, added some text to it and set its parent window to an Excel application.

When I Zoom out the Excel sheet I want the Static Control to also zoom by the same ratio....  ie : The size of the Text in the Static Control should adjust according to the new Zoom of the Uderlying Excel worksheet .

Can this be done ?

Thanks.
0
RAFAAJ
Asked:
RAFAAJ
1 Solution
 
tguezCommented:
Let me get this correctly.  You are not writing in excel.  You are interving with excel in a forceful way. You are creating a window using an api that excel does not know of.  Then you want to monitor excel for when there is a zoom, and change the zoom of the excel.

Now, clearify:

Is your applciation written in excel?  Or is it an outside applciation of excel.

If your application is within excel, then just monitor with a timer or something the value of the zoom of the window in question.  If the value changes, then change your text in the static control.  That is it.

If applciation is out side of excel, and you have created the instance of excel using an ole automation, then you can do the above as well.

But if your application is an outside application, not an excel and not a ole of excel, then you are in hard luck my friend, this is possible to do only with hacking techniques.

Tomer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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