Click to See Complete Forum and Search --> : FrameWindows


flotat
April 13th, 1999, 07:05 AM
Hi all.
I declared a public member (m_dbgoutput) in the MDIFrameWnd class (defined in MainFrm.cpp).
I'd like to access Methods (AddString() for example) from that member from within any part of the application. I didn't find the way to gain access to MdiFrameWnd member from within CDocument nor CView class.
How can i access methods from that member declared in MainFrm.h ?

Thanks.

Karl
April 13th, 1999, 08:34 AM
CMainFrame *pFrame=(CMainFrame *)AfxGetThread()->m_pMainWnd;

HTH

K.

Ash to ash and clay to clay, if the enemy doesn't get you, your own folk may.

flotat
April 13th, 1999, 08:49 AM
Thanks for all Karl,
in fact I discovered in your code why i was wrong....
I tried to use a CMDIFrameWnd pointer and a pointer from the derived CMainFrame ......
that's a real beginner error .....

Thanks.