Re: how to caption an mdi window?
--- In powerpro-beginners@..., Brother Gabriel-Marie
<brgabriel <at> ...> wrote:
>
> I have a Powerpro toolbar that shows (automatically by context)
> for Photoshop and Indesign. I want to program a button to size
> one of those program's document windows - now, I don't mean the
> main program window, but I do mean the mdi window. I can grab
> them with a window-handle number, but the window-handles change
> all the time. I can't seem to get them with their window class or
> title text, and the PowerPro "error if no such window" option
> turns up the error in either case.
I believe you will need to reference the handle of the child window
you want to target. You can use Win.ChildHandleList for the main
program to get a space separated list of all the child windows. If you
have a document type class (check the window with WindowInfo or other
app such as Windowse) you can limit the list from Win.ChildHandleList
to handles of that class. Then the first "word" of the list will be
the instance of that class most recently used.
Or you can use Win.HandleFromPoint(xmouse, ymouse) to get the handle
of the window under the mouse. If you use Win.HandleFromPoint, you
will probably need to run your code from a hotkey, not a button,
because the mouse position would need to be over the document window
(not over a bar button). It could be done from a bar button, but you'd
need more code, e.g., to tell yourself to move the mouse over the
document.
Might be easier to get it working with a script that is run by your
bar button or hotkey than trying to work it out in the command block
of a bar button or hotkey on the configuration screen.
Regards,
Sheri
------------------------------------
PowerPro can be found here: http://www.ppro.org/
and here: http://ppro.pcrei.com/Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/powerpro-beginners/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/powerpro-beginners/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:powerpro-beginners-digest@...
mailto:powerpro-beginners-fullfeatured@...
<*> To unsubscribe from this group, send an email to:
powerpro-beginners-unsubscribe@...
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/