Click here to Skip to main content
15,902,112 members
Home / Discussions / COM
   

COM

 
GeneralRe: using matlab code in vb environment Pin
freesun5-May-06 3:53
freesun5-May-06 3:53 
GeneralRe: using matlab code in vb environment Pin
Vibhash Jha5-May-06 4:31
Vibhash Jha5-May-06 4:31 
GeneralRe: using matlab code in vb environment Pin
freesun5-May-06 4:33
freesun5-May-06 4:33 
GeneralRe: using matlab code in vb environment Pin
Vibhash Jha5-May-06 4:57
Vibhash Jha5-May-06 4:57 
GeneralRe: using matlab code in vb environment Pin
freesun5-May-06 6:29
freesun5-May-06 6:29 
QuestionWorking with the Shell and an object in a virtual folder Pin
DeepT25-Apr-06 8:23
DeepT25-Apr-06 8:23 
QuestionCOM interface as a wrapper for MFC SDI Pin
kirannarik25-Apr-06 2:55
kirannarik25-Apr-06 2:55 
QuestionCOM Events Pin
HakunaMatada24-Apr-06 19:46
HakunaMatada24-Apr-06 19:46 
I found this Question on Google Groups.

hello, <br />
I've created an ATL project and inserted sipmple COM object into it <br />
implementing connection points - at this stage firing the events works fine. <br />
After that i made "class CDialog1 :  public CAxDialogImpl<CDialog1>" and <br />
included its .h file in the .cpp file of the COM object class . Than I've <br />
made (with DoModal) a dialog in the COM object base class and it works fine <br />
but how can i throw the events implemented in the base COM object from the <br />
dialog or how can i made conection from the dialog to the base class. <br />
The problems are <br />
1)i can't include the .h file of the base COM object class into the dialog <br />
.h file because they get nested (i've already included the dialog .h file in <br />
the base COM object .cpp - this is needed to create the dialog there) <br />
2)i can't use, lets say  CHAIN_MSG_MAP(CMyBase) in the dialog .h file <br />
because CMyBase is not defined at this stage! <br />
<br />
<br />
please help, <br />
miro 


And this answer..

Define an interface abstract class in the dialog header and let your dialog <br />
call into it (it is initialized with a pointer to that interface class <br />
before <br />
DoModal). Implement this abstract interface class on your COM object <br />
and pass your this pointer to the dialog before issuing DoModal. Voila! <br />
Your dialog fires notifications without knowing about your COM class <br />
a bit! <br />
<br />
<br />
BTW, an interface class looks like a COM interface, but doesn't need to <br />
derive from IUnknown: <br />
<br />
<br />
class IMyCppInterface <br />
{ <br />
public: <br />
    virtual void MyInterfaceMethod(CAnotherClass &rMyClassArg) = 0; <br />
<br />
<br />
<br />
}; <br />
<br />
<br />
As you see, you are not limited with COM types altogether... 

--

Can anyone explain to me what the answer means...???Confused | :confused: Confused | :confused:

---
With best regards,
A Manchester United Fan

The Genius of a true fool is that he can mess up a foolproof plan!
AnswerRe: COM Events Pin
Roger Stoltz24-Apr-06 22:24
Roger Stoltz24-Apr-06 22:24 
GeneralRe: COM Events Pin
HakunaMatada25-Apr-06 0:26
HakunaMatada25-Apr-06 0:26 
AnswerRe: COM Events Pin
Roger Stoltz25-Apr-06 1:45
Roger Stoltz25-Apr-06 1:45 
GeneralRe: COM Events Pin
HakunaMatada25-Apr-06 2:05
HakunaMatada25-Apr-06 2:05 
AnswerRe: COM Events Pin
Roger Stoltz25-Apr-06 3:20
Roger Stoltz25-Apr-06 3:20 
GeneralRe: COM Events Pin
HakunaMatada25-Apr-06 3:27
HakunaMatada25-Apr-06 3:27 
QuestionDouble-click on lnk file Pin
Samsung24-Apr-06 9:25
Samsung24-Apr-06 9:25 
Questionllo,Double-click on lnk file Pin
Samsung24-Apr-06 9:20
Samsung24-Apr-06 9:20 
QuestionCOM's Event! Pin
huangdingjun23-Apr-06 3:34
huangdingjun23-Apr-06 3:34 
AnswerRe: COM's Event! Pin
Stephen Hewitt23-Apr-06 13:39
Stephen Hewitt23-Apr-06 13:39 
GeneralRe: COM's Event! Pin
hdj831123-Apr-06 15:12
hdj831123-Apr-06 15:12 
GeneralRe: COM's Event! Pin
Stephen Hewitt23-Apr-06 16:08
Stephen Hewitt23-Apr-06 16:08 
GeneralRe: COM's Event! Pin
hdj831123-Apr-06 19:21
hdj831123-Apr-06 19:21 
Questionproblem with com events Pin
kk_mfc21-Apr-06 19:27
kk_mfc21-Apr-06 19:27 
AnswerRe: problem with com events Pin
Lim Bio Liong23-Apr-06 2:00
Lim Bio Liong23-Apr-06 2:00 
QuestionExceptions in CoUninitialize Pin
softwaremonkey21-Apr-06 0:05
softwaremonkey21-Apr-06 0:05 
AnswerRe: Exceptions in CoUninitialize Pin
Mike Dimmick21-Apr-06 0:40
Mike Dimmick21-Apr-06 0:40 

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.