Click here to Skip to main content
16,008,750 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to store float number (4 bytes) to a byte array Pin
toxcct20-Jul-06 8:06
toxcct20-Jul-06 8:06 
GeneralRe: how to store float number (4 bytes) to a byte array Pin
Zac Howland20-Jul-06 9:20
Zac Howland20-Jul-06 9:20 
GeneralRe: how to store float number (4 bytes) to a byte array Pin
shengcheng_jin20-Jul-06 15:26
shengcheng_jin20-Jul-06 15:26 
QuestionHow to create a SMTP server Pin
cyin820-Jul-06 7:03
cyin820-Jul-06 7:03 
AnswerRe: How to create a SMTP server Pin
Rilhas21-Jul-06 12:25
Rilhas21-Jul-06 12:25 
QuestionOnNewDocument - clear Pin
DanYELL20-Jul-06 6:50
DanYELL20-Jul-06 6:50 
AnswerRe: OnNewDocument - clear Pin
Warren Stevens20-Jul-06 7:27
Warren Stevens20-Jul-06 7:27 
QuestionDetermination of an EventID of an ActiveX at Runtime [modified] Pin
masanne20-Jul-06 4:18
masanne20-Jul-06 4:18 
Hallo!

I created an ActiveX, which create an instance of another activeX at runtime and then determine the dispid with the name of a method (with the function: GetIDsOfNames(…)).
In the next step I can call this method with InvokeHelper(…).
So far, so good.
But if I want determine an EventId of a special Event with the name “CollectEvent”, I comes in trouble, because I have no plan.
Please help me to determine the eventid or give me a tip.
Thanks in advance.

Here the code for the invocation of a method:

<br />
....<br />
CWnd m_ControlWrapper;<br />
RECT rct = {0,0,5,50};<br />
<br />
BOOL bStat=FALSE;<br />
bStat= m_ControlWrapper.CreateControl(clsid, "Spectrometer", WS_CHILD, rct, this, 1212, NULL, FALSE, NULL);<br />
<br />
if (bStat == FALSE)<br />
{<br />
	MessageBox ("Could not place control");<br />
	return;<br />
}<br />
			<br />
// Use the IUnknown of the control.<br />
LPUNKNOWN pUnk = m_ControlWrapper.GetControlUnknown();<br />
<br />
// From there get the IDispatch interface of control.<br />
LPDISPATCH pInterface = NULL;<br />
<br />
pUnk->QueryInterface(IID_IDispatch, (LPVOID*)&pInterface);<br />
				<br />
<br />
CString CstrMethod = "STATUS"; <br />
BSTR BstrMethod = CstrMethod.AllocSysString();<br />
<br />
DISPID dispid; <br />
<br />
// get the id of the method									<br />
HRESULT hRet = pInterface->GetIDsOfNames(IID_NULL, &BstrMethod, 1, LOCALE_SYSTEM_DEFAULT, &dispid); <br />
<br />
// invoke the method<br />
m_ControlWrapper.InvokeHelper(dispid, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);//InvokeHelper(0xc, DISPATCH_METHOD , VT_EMPTY, NULL, NULL);<br />
<br />
....<br />
<br />
<br />


-- modified at 10:19 Thursday 20th July, 2006
QuestionCombo Box Value Pin
LCI20-Jul-06 4:16
LCI20-Jul-06 4:16 
AnswerRe: Combo Box Value Pin
Cedric Moonen20-Jul-06 4:37
Cedric Moonen20-Jul-06 4:37 
GeneralRe: Combo Box Value Pin
LCI20-Jul-06 4:51
LCI20-Jul-06 4:51 
GeneralRe: Combo Box Value Pin
Cedric Moonen20-Jul-06 4:55
Cedric Moonen20-Jul-06 4:55 
GeneralRe: Combo Box Value Pin
Cedric Moonen20-Jul-06 5:06
Cedric Moonen20-Jul-06 5:06 
AnswerRe: Combo Box Value Pin
David Crow20-Jul-06 5:03
David Crow20-Jul-06 5:03 
QuestionHow can i detect that the system has just restarted/powered on Pin
Kim Togo20-Jul-06 3:54
professionalKim Togo20-Jul-06 3:54 
AnswerRe: How can i detect that the system has just restarted/powered on Pin
David Crow20-Jul-06 4:10
David Crow20-Jul-06 4:10 
AnswerRe: How can i detect that the system has just restarted/powered on Pin
Dimitris Vikeloudas20-Jul-06 4:23
Dimitris Vikeloudas20-Jul-06 4:23 
GeneralRe: How can i detect that the system has just restarted/powered on Pin
Kim Togo20-Jul-06 20:22
professionalKim Togo20-Jul-06 20:22 
QuestionCOM reading and string format Pin
tanarnelinistit20-Jul-06 3:52
tanarnelinistit20-Jul-06 3:52 
AnswerRe: COM reading and string format [modified] Pin
earl20-Jul-06 4:05
earl20-Jul-06 4:05 
QuestionSome question on RPC Memory allocation Pin
yccheok20-Jul-06 3:49
yccheok20-Jul-06 3:49 
QuestionInternetFindNextFile??? Pin
_AnsHUMAN_ 20-Jul-06 3:45
_AnsHUMAN_ 20-Jul-06 3:45 
AnswerRe: InternetFindNextFile??? Pin
earl20-Jul-06 3:47
earl20-Jul-06 3:47 
QuestionRe: InternetFindNextFile??? Pin
David Crow20-Jul-06 4:14
David Crow20-Jul-06 4:14 
AnswerRe: InternetFindNextFile??? Pin
_AnsHUMAN_ 20-Jul-06 4:19
_AnsHUMAN_ 20-Jul-06 4:19 

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.