Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

REPOST: NJAWIN and getting a handle to Internet Explorer Popup Windows

843829Jul 16 2004 — edited Jul 19 2004
I am using njawin to generate mshtml and shdocvw in order to control Internet
Explorer. I can get IE to come up and I can click links, set inputs, etc. When I click a link that pops up a new window the correct listener gets called but the reference to the new window is null.

Njawin generated Java for new window event:
public void NewWindow2(Object o, ObjectRef objectRef, ObjectRef objectRef1) throws COMException

MSHTML interface:
void NewWindow2(
IDispatch **&ppDisp,
VARIANT_BOOL *&Cancel
);


When the NewWindow2 java event is called, a reference to the original parent IWebBrowser2 is passed in the first parameter "Object o". And it looks like the new popup IWebBrowser2 should be passed in the second parameter "ObjectRef objectRef", but unfortunately it's getRef method returns null. The third parameter returns boolean which is correct according to the mshtml interface definition.

Does the code njawin generate not support these types of events properly? What can I do to make it work?

Thanks,

Brian
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2004
Added on Jul 16 2004
2 comments
80 views