Click here to Skip to main content
15,892,480 members
Home / Discussions / COM
   

COM

 
Generalactivexscripting Pin
dittygrail12-Jun-05 23:08
dittygrail12-Jun-05 23:08 
GeneralBSTR Pin
pardis11-Jun-05 20:20
pardis11-Jun-05 20:20 
GeneralRe: BSTR Pin
User 21559713-Jun-05 3:44
User 21559713-Jun-05 3:44 
GeneralRe: BSTR Pin
Lim Bio Liong13-Jun-05 23:44
Lim Bio Liong13-Jun-05 23:44 
GeneralRe: BSTR Pin
Get.Well14-Jun-05 1:57
Get.Well14-Jun-05 1:57 
GeneralLooking for Excel ver.9 type library (and how to make it work!) Pin
minette9-Jun-05 3:58
minette9-Jun-05 3:58 
GeneralCopy data to spread sheet component from excel file Pin
Member 20313358-Jun-05 22:34
Member 20313358-Jun-05 22:34 
GeneralCapturing ActiveX events Pin
Haroon8-Jun-05 19:51
Haroon8-Jun-05 19:51 
i have developed a VC++ application hosting Dhtml Edit Control inside which i have placed ActiveX control.
Activex control are basically customized buttons in html page that i have loaded in Dhtml edit control.
I have successfuly captured Dhtml Events in VC++ when simple html page is loaded.

when i load the html page with the Activex control my visual applicaiton is unable to capture the events.
I want to capture ActiveX events which is hosted in Dhtml Edit Contol, in my VC++ applications.
D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh:



BOOL CDOMGeneralSubs::EstablishConnectionPoint
(IDispatch * dom,IDispatch*pHTMLElementEventsHandler)
{
// AfxMessageBox( "in EstablishConnectionPoints" );
BOOL bRet=FALSE;

IConnectionPointContainer*pConnectionPointContainer;
HRESULT Result=dom->QueryInterface(IID_IConnectionPointContainer,(void**)&pConnectionPointContainer);
if(SUCCEEDED(Result))
{
IConnectionPoint*pConnectionPoint;
Result=pConnectionPointContainer->FindConnectionPoint(DIID_HTMLDocumentEvents,&pConnectionPoint);

if(SUCCEEDED(Result))
{
DWORD Cookie=0;
Result=pConnectionPoint->Advise(pHTMLElementEventsHandler,&Cookie);
if(SUCCEEDED(Result))
bRet=TRUE;

pConnectionPoint->Release();
}

pConnectionPointContainer->Release();
}

return bRet;
}



STDMETHODIMP XSZone::CHTMLElementEvents::Invoke(
DISPID dispIdMember,
REFIID riid,
LCID lcid,
WORD wFlags,
DISPPARAMS FAR* pDispParams,
VARIANT FAR* pVarResult,
EXCEPINFO FAR* pExcepInfo,
unsigned int FAR* puArgErr
)
{
// AfxMessageBox( "in Invoke" );
switch (dispIdMember)
{
case DISPID_HTMLELEMENTEVENTS_ONMOUSEDOWN:
{
return This()->OnHTMLEventClick();
}
break;
}
return E_NOTIMPL;
}



STDMETHODIMP XSZone::OnHTMLEventClick()
{

//AfxMessageBox("in OnHTMLEventClick" );
MSHTML::IHTMLDocument2Ptr spIHTMLDocument2(m_wndDHTMLEdit.GetDom());
// m_wndDHTMLEdit is a instanse of DHTMLEdit Control

MSHTML::IHTMLElementPtr spElement = spIHTMLDocument2->parentWindow->event->srcElement;

CString strElementId = (LPCTSTR)(spElement->id);



Enjoy programming and pray for me.
GeneralSending User Defined Types over COM Interface Pin
ChemmieBro8-Jun-05 4:53
ChemmieBro8-Jun-05 4:53 
GeneralRe: Sending User Defined Types over COM Interface Pin
Andy Moore8-Jun-05 11:06
Andy Moore8-Jun-05 11:06 
GeneralRe: Sending User Defined Types over COM Interface Pin
Lim Bio Liong14-Jun-05 1:16
Lim Bio Liong14-Jun-05 1:16 
GeneralRe: Sending User Defined Types over COM Interface Pin
Logan from Singapore26-Jun-05 23:05
Logan from Singapore26-Jun-05 23:05 
GeneralRe: Sending User Defined Types over COM Interface Pin
Lim Bio Liong27-Jun-05 0:26
Lim Bio Liong27-Jun-05 0:26 
GeneralCreate GUID from string Pin
Kri58-Jun-05 4:17
Kri58-Jun-05 4:17 
GeneralRe: Create GUID from string Pin
Anonymous9-Jun-05 1:00
Anonymous9-Jun-05 1:00 
GeneralGet Control ID from ActiveX button Pin
MailtoGops6-Jun-05 5:52
MailtoGops6-Jun-05 5:52 
GeneralRe: Get Control ID from ActiveX button Pin
Veera Raghavendra17-Jun-05 19:08
Veera Raghavendra17-Jun-05 19:08 
GeneralRe: Get Control ID from ActiveX button Pin
MailtoGops22-Aug-05 0:25
MailtoGops22-Aug-05 0:25 
GeneralDistributed Transaction Error Pin
janlala5-Jun-05 0:10
janlala5-Jun-05 0:10 
QuestionIDispacth, ADORecordset and properties loss?!? Pin
almc3-Jun-05 0:53
almc3-Jun-05 0:53 
General Acessing ActiveX Component Interfaces/ Library not registered Pin
Florian Storck1-Jun-05 23:13
Florian Storck1-Jun-05 23:13 
GeneralRe: Acessing ActiveX Component Interfaces/ Library not registered Pin
lemur21-Jun-05 23:25
lemur21-Jun-05 23:25 
GeneralRe: Acessing ActiveX Component Interfaces/ Library not registered Pin
Florian Storck1-Jun-05 23:34
Florian Storck1-Jun-05 23:34 
GeneralRe: Acessing ActiveX Component Interfaces/ Library not registered Pin
Florian Storck2-Jun-05 0:12
Florian Storck2-Jun-05 0:12 
GeneralRe: Acessing ActiveX Component Interfaces/ Library not registered Pin
lemur22-Jun-05 21:58
lemur22-Jun-05 21:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.