Board index » cppbuilder » event sink for DIID_HTMLInputTextElementEvents2
lendle
![]() CBuilder Developer |
lendle
![]() CBuilder Developer |
event sink for DIID_HTMLInputTextElementEvents22005-06-29 02:38:37 PM cppbuilder80 Excuse me, if I write event sink for DIID_HTMLInputTextElementEvents2ĦA what information can I get from InvokeEvent(DISPID id, TVariant* params)? I know there is a params argument, but it is TVariant, how can I decode information from that argument if I catch onclick event from the input element? Furthermore, if the event was fired from javascript, is there any chance to store an com object with the event and catch that object in bcb? thanks |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2005-06-30 02:40:38 AM
Re:event sink for DIID_HTMLInputTextElementEvents2
"lendle" < XXXX@XXXXX.COM >wrote in message
Quoteif I write event sink for DIID_HTMLInputTextElementEvents2 msdn.microsoft.com/workshop/browser/mshtml/reference/events/htmlinputtextelementevents2/htmlinputtextelementevents2.asp QuoteI know there is a params argument, but it is TVariant, switch( id ) { //... case DISPID_HTMLELEMENTEVENTS2_ONCLICK: { TComInterface<IHTMLEventObj, &IID_IHTMLEventObj>EventIntf; EventIntf = V_DISPATCH(¶ms[0]); if( EventIntf ) // use EventIntf as needed... break; } //... } return S_OK; } Do note that the onclick event has a VARIANT_BOOL return value to indicate whether the event can bubble to other event handlers. However, TEventDispatcher::InvokeEvent() does not expose any means of setting the return value for events. So if you need to return a value from an event, you cannot use TEventDispatcher for it. You will have to write your own IDispatch implementation from scratch so that you can implement IDispatch::Invoke() directly. QuoteFurthermore, if the event was fired from javascript, is there any specify your own objects. Gambit |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2005-06-30 02:45:25 AM
Re:event sink for DIID_HTMLInputTextElementEvents2
"lendle" < XXXX@XXXXX.COM >wrote in message
Quoteif I write event sink for DIID_HTMLInputTextElementEvents2 newsgroup guidelines (info.borland.com/newsgroups). Only post to the single most appropropriate group. Your question has already been addressed in the "borland.public.cppbuilder.activex" newsgroup. Gambit {smallsort} |