child window messages

S

SteveT

. Reply (E-mail) Forward (E-mail)

Subject: child window messages
From: "Steve T" <[email protected]> Sent:
11/24/2003 3:29:39 PM




We have an application where we need to open and move
multiple word files. We have found that the second word
file opens without its scroll-bars.
Here is a sequence we have tried programatically:
1) Open a word window and it opens a new Empty document.
2) Open a file from it using File/open. This causes the
file to open in a new window and the old window is hidden.
3) Open another file from File/Open. To accomodate this
new file in our application, we resize the existing file
but scroll bars (both horizontal and Vertical) are not
visible (Actually they are not resized according to main
window). We use MoveWindow() API to move the existing
window to correct size and location. Beside that, by
subclassing we handle WM_WINDOWPOSCHANGING message for
Word and change it parameters so that its correct size
and location can be enforced.

When we look in spy, we have the follwoing Hierarchy of
windows in a word document.
OpusApp (ClassName of main WIndow)
|___WwF (Classname of child window)
|____WwB (Classname of Child WIndow)

Scroll bars are child windows of windows with classname
_WwB. We get WM_WINDOWPOSCHANGING message till _WwB
window and after that there no resizing message to Child
windows like scroll bar etc due to which they are not
resized.

But if we manually resize EW then all child windows get
the messages and then they are properly resized. How can
we do the equivalent programmatically?

This question is also posted in the word.pagelayout group
..
 
E

Eric Lawrence [MSFT]

This message is probably outside the scope of this group; you'll probably
want to try it again in one of the programmability groups.

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Cindy M -WordMVP-

Hi SteveT,
We have an application where we need to open and move
multiple word files. We have found that the second word
file opens without its scroll-bars.
As Eric says, you probably want to post this in one a
non-end user group. Office.Developer groups are more
oriented to the programming language you use. OTOH, a
Word.VBA group is more likely to turn up someone who may
have experienced the problem, otherwise.

FWIW, it sounds familiar to me, but I can't quite put my
finger on it. What I'm groping for is something that
happens when COM is used to automate Word (or other Office
apps) from another application, or to manipulate it in a
control in another application.

I think the one thing I remember is "forgetting" to use the
.Activate method for the application.

I hope this gives you enough to go searching through the
Knowledge Base, because I believe there is (or at least
was) an article along these lines (maybe for VB).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top