Click here to Skip to main content
16,004,974 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: LPCSTR and LPCWSTR Pin
Iain Clarke, Warrior Programmer20-Aug-07 5:41
Iain Clarke, Warrior Programmer20-Aug-07 5:41 
GeneralRe: LPCSTR and LPCWSTR Pin
George_George20-Aug-07 17:26
George_George20-Aug-07 17:26 
GeneralRe: LPCSTR and LPCWSTR Pin
George_George20-Aug-07 17:36
George_George20-Aug-07 17:36 
GeneralRe: LPCSTR and LPCWSTR Pin
Iain Clarke, Warrior Programmer21-Aug-07 0:02
Iain Clarke, Warrior Programmer21-Aug-07 0:02 
GeneralRe: LPCSTR and LPCWSTR Pin
George_George21-Aug-07 1:24
George_George21-Aug-07 1:24 
GeneralRe: LPCSTR and LPCWSTR Pin
Iain Clarke, Warrior Programmer21-Aug-07 3:29
Iain Clarke, Warrior Programmer21-Aug-07 3:29 
GeneralRe: LPCSTR and LPCWSTR Pin
George_George21-Aug-07 5:28
George_George21-Aug-07 5:28 
QuestionIDispatch to class object Pin
Monark20-Aug-07 4:54
Monark20-Aug-07 4:54 
Hi All,
I am developing a MFC ActiveX Control. In that I have exposed one method to the automation client.This method has four argument. First will be the object of class CMyItem and second will be the object of CMyObj class.

<br />
LONG CMyCtrl::ExecuteRequest(IDispatch* myItem,IDispatch* myObj, LPCTSTR str1,LPCTSTR extraInfo)<br />
{<br />
	return 0;<br />
}<br />


Now I want to get back the object from IDispatch.

i.e.
<br />
CMyObj m_obj;      <br />
CMyItem m_item;<br />
<br />
m_item =  myItem ; // first argument IDispatch* myItem<br />
myobj = myObj ;// second argument IDispatch* myObj<br />
<br />
myobj.Dosomething();<br />
<br />


But the compiler is giving an error saying that cant convert from IDispatch to class object.

Any Idea how can I get cast the object from IDispatch to class

Thanks,
Micky
AnswerRe: IDispatch to class object Pin
Mark Salsbery20-Aug-07 8:05
Mark Salsbery20-Aug-07 8:05 
QuestionTrouble with vectors. Newbie needs help! Pin
Flipflopninja20-Aug-07 4:49
Flipflopninja20-Aug-07 4:49 
AnswerRe: Trouble with vectors. Newbie needs help! Pin
Maxwell Chen20-Aug-07 5:05
Maxwell Chen20-Aug-07 5:05 
AnswerRe: Trouble with vectors. Newbie needs help! Pin
David Crow20-Aug-07 5:20
David Crow20-Aug-07 5:20 
AnswerRe: Trouble with vectors. Newbie needs help! [modified] Pin
Graham Shanks20-Aug-07 5:37
Graham Shanks20-Aug-07 5:37 
Questionfopen and wfopen Pin
George_George20-Aug-07 4:35
George_George20-Aug-07 4:35 
QuestionRe: fopen and wfopen Pin
David Crow20-Aug-07 4:39
David Crow20-Aug-07 4:39 
AnswerRe: fopen and wfopen Pin
George_George20-Aug-07 5:00
George_George20-Aug-07 5:00 
QuestionRe: fopen and wfopen Pin
David Crow20-Aug-07 5:18
David Crow20-Aug-07 5:18 
AnswerRe: fopen and wfopen Pin
George_George20-Aug-07 17:43
George_George20-Aug-07 17:43 
GeneralRe: fopen and wfopen Pin
David Crow21-Aug-07 2:55
David Crow21-Aug-07 2:55 
GeneralRe: fopen and wfopen Pin
George_George21-Aug-07 3:09
George_George21-Aug-07 3:09 
GeneralRe: fopen and wfopen Pin
David Crow21-Aug-07 3:21
David Crow21-Aug-07 3:21 
AnswerRe: fopen and wfopen Pin
Paresh Chitte20-Aug-07 20:09
Paresh Chitte20-Aug-07 20:09 
GeneralRe: fopen and wfopen Pin
George_George20-Aug-07 20:28
George_George20-Aug-07 20:28 
GeneralRe: fopen and wfopen Pin
Paresh Chitte21-Aug-07 18:19
Paresh Chitte21-Aug-07 18:19 
GeneralRe: fopen and wfopen Pin
George_George21-Aug-07 20:59
George_George21-Aug-07 20:59 

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.