Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC Accessing one Class at anytime ?

Status
Not open for further replies.

Brander

Vendor
Sep 3, 2003
1
DK
Greetings programers.
I'm programming in Microsoft Visual C++ 6.0. The problem is the following. I use the Wizar to create my template App (Dialog based). I use 2 Classes let's say CDialog-derived one and a CInternerSession-derived other. I added int the Dialog a pointer to a CInternerSession-derived, so I can controll the CInternerSession from the Dialog. But here is the question: There is a Callback method in the CInternerSession-derived I overrided and this Callback is called by the system when an Internal event occurs. How can I control or call some methods of the Dialog from this CallBack of the other Class (CInternerSession). The Question is: How can I get Acces to the Dialog or some other Class from another one ? Is there something like GetActuall Dialog ?


Thanks
 
> How can I get Acces to the Dialog or some other Class from another
> one ? Is there something like GetActuall Dialog ?

AfxGetMainWnd()

Hope this helps
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top