pointer to a class problem 
Author Message
 pointer to a class problem


I have an activeX exe.  It has a class which receives connection point
events from another ATL object.  It has a main class (I will refer to as the
main class) which loads the external ATL object.

When I get a certain event back (in the connection points sink class) I want
to be able to run methods in the main class.  Eg if the main class has a
function DoSomethingWithExternalObject I want to call that.

I thought that the best way to do this would be to call a static function
declared in main class from sink class.  Then in this static function get a
pointer to main class and call a member function in main class.  Is this
best way?

If so how do I get a pointer to main class?

Angus Comber

Wed, 23 Feb 2005 23:22:24 GMT  
 [ 1 post ] 

 Relevant Pages 

1. how to convert base class pointer to sub class pointer

2. Class pointer problem

3. Problems Using Function Pointers in C++ Classes

4. VC++ problem with class data member pointers

5. [ CDialog derived class pointer problem... ]

6. Counted Pointer class for STL problem (knowlage of templates needed)

7. STL-based Class with pointer problem

8. Embed template class pointer inside managed class

9. Inherited class function calls from a pointer assigned to the base class

10. pointer CSubDlg class to CMainDlg class

11. Get pointer from a View derived class to the current CFrameWnd class

12. How to pass a view class pointer to a thread class


Powered by phpBB® Forum Software