child window - is it or isn't it?
This is one of several sub-problems that I need to solve in order to solve
a larger problem with printing documents using Word 97 via automation from
VBA. The larger problem will require the use of the win32 API from VBA,
hence my desperate resort to this forum!
Say you use MS Word 97 to print a document whose margins are set outside
the printable area of the page. Word displays a popup message: "The margins
of section 1 are set outside the printable area of the page. Do you want to
I'm confused as to whether that popup IS or ISN'T a child window of the
Word main window.
The message can be dragged outside the boundaries of the Word main window,
which suggests to me that it is NOT a child window. (I believe child
windows are constrained to the parent window area. Yes?)
However, if I call GetParent on its window handle, I get the Word main
window handle - which suggests the popup IS a child window!
Can anyone tell me whether the popup in question IS or ISN'T a child window
of the Word main window (& explain the discrepancy noted above)?
The popup in question gives the following display when using a VBA
equivalent of the "Spy" type code in Q112649. (My output interprets the
window style bits.)
Window Handle: &H5CC
Window Text: Microsoft Word
Window Class Name: #32770
Window Style: &H94C801C5
-- window styles --
-- common styles --
-- extended styles --
Window ID Number: &H0
Parent Window Handle: &HBD0
Parent Window Text: Microsoft Word - zz cert Aow-fc.doc
Parent Window Class Name: OpusApp
Module: C:\PROGRAM FILES\OFFICE97\OFFICE\MSACCESS.EXE