MS Word

B

Ben Taylor

Hi
Can someone please tell me why it's impossible to subclass a Word window.
I've tried all three levels - the main application (OpusApp), the window
inside that (_WwF) and the document window (_WwB) and all of them return 0
from SetWindowLong. I didn't know it was possible for a window to choose not
to have itself subclassed?
 
E

Eduardo A. Morcillo [MS MVP]

Can someone please tell me why it's impossible to subclass a Word
window. I've tried all three levels - the main application (OpusApp),
the window inside that (_WwF) and the document window (_WwB) and all
of them return 0 from SetWindowLong. I didn't know it was possible
for a window to choose not to have itself subclassed?

Ben, Are you trying to subclass it from another process? A window owned by a different process cannot be subclassed using SetWindowLong.
 
B

Ben Taylor

Oh Thanks I didn't know it had to be the same process. Yes I was trying to
do it from a normal VB6 project to test it, but I was hoping that once I'd
debugged the code for the subclassing I was going to put it into a Word
Add-In.
The word Add-In would be able to subclass it as it should be the same
process, am I right?

Eduardo A. Morcillo said:
Can someone please tell me why it's impossible to subclass a Word
window. I've tried all three levels - the main application (OpusApp),
the window inside that (_WwF) and the document window (_WwB) and all
of them return 0 from SetWindowLong. I didn't know it was possible
for a window to choose not to have itself subclassed?

Ben, Are you trying to subclass it from another process? A window owned by a
different process cannot be subclassed using SetWindowLong.
 

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