child window messages

S

Steve T

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?
 

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