Click here to Skip to main content
16,012,082 members
Home / Discussions / COM
   

COM

 
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 
AnswerRe: COM Events Pin
Roger Stoltz24-Apr-06 22:24
Roger Stoltz24-Apr-06 22:24 
If I was to answer the original question I would have asked for more information since I cannot understand why the header file for the COM object cannot be included in the header file of the dialog. The reason given is that "they get nested", which is a common problem solved with preprocessor directives, e.g.
#ifndef MYFILE_INCLUDED<br />
#define MYFILE_INCLUDED<br />
<br />
// some declarations<br />
<br />
#endif


However, the answer suggests that another header file is created, declaring an abstract base class from which the COM object should be derived. The dialog should have a member variable that is a pointer to the newly declared abstract class which sould be set by a call prior to calling DoModal() from the COM object.
The abstract class has a virtual function, implemented by the COM object, that the dialog object calls when it wants to fire the COM event. This is how the dialog can call the COM object without including its header file.

N.B. this is not how I would have solved the problem, but this is what the answer suggests and that was what you asked for...

Hope this helps
--
Roger


It's suppose to be hard, otherwise anybody could do it!
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 
GeneralRe: Exceptions in CoUninitialize Pin
softwaremonkey21-Apr-06 2:04
softwaremonkey21-Apr-06 2:04 

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.