--- In [email protected], "swzoh" <sean...@...> wrote:

> objTom = com.AccessibleObjectFromWindow(hwndRichEdit, OBJID_NATIVEOM, 
> IID_IDispatch) ;; the third parameter can be optional, defaultly set to 
> IID_IDispatch
> objTom.BeginEditCollection()

I hadn't run into AccessibleObjectFromWindow before. 

http://msdn.microsoft.com/en-us/library/dd317978%28VS.85%29.aspx

says "To obtain an IDispatch interface pointer to a class supported by the 
native object model, specify OBJID_NATIVEOM in dwObjectID. When using this 
object identifier, the hwnd parameter must match the following window class 
types."  And then goes on to list only a few Office windows classes.  But it's 
your understanding that this would also work for other window classes?  If so, 
is there a way of determining which window class will return which interface 
type?
In particular that applied to a rich edit control it will return a IRichEditOle?

Your IID_IDispatch parameter above would have to be replaced with text so 
Powerpro could understand it.  If I can make this work I'll probably start with 
no option, and you always get a IID_IDispatch; if that works I can provide 
predefined strings to map onto IAccessible, IDispatch, IEnumVARIANT, IUnknown, 
etc.  




Reply via email to