Hi
From the link before,
The interaction of the form with Office depends on whether the form is
modeless. Modeless form cannot interact directly with the Office object
model. Instead, you will need to design your application such that the
modeless form returns information to the calling code. The calling code may
then interact with the object model. Generally, modal forms will be able to
interact with the Office object model.
We will know that we can use the Modeless form. While because the form is
modeless, if we want to interact the form with Office, we may need to hold
the reference to the office application in the form class and vice versa,
so that when the form get focus we can manipulate the office Object modal
to retrieve or set information, and when the office application get focus,
we can manupilate the Form instance to display different information.
A message queue is thread based, that is to say for the office application,
we can consider it has just one message queue, and if we show the modeless
form in the office application is similar with we have a windows
application and the windows application will have two windows or more. The
office application's will handle the message dispatch issue, i.e. how to
handle messages in the thread's message queue(known as message pump), e.g.
dispatch to certain window's winproc.
For detailed information about windows message, you may refer to
Programming Applications for Microsoft Windows written by Jeffrey Richter.
If you still have any concern, please feel free to post here.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.