CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: FrameWindows

  1. #1
    Join Date
    Apr 1999
    Posts
    12

    FrameWindows

    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.


  2. #2
    Join Date
    May 1999
    Location
    Toulouse, France
    Posts
    171

    Re: FrameWindows

    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.
    We're talking ****, 'cause life is a 'biz
    You know it is
    Everybody tryin' to get rich
    God ****!
    All I wanna do is live !

    KoRn, Children of the Korn

  3. #3
    Join Date
    Apr 1999
    Posts
    12

    Re: FrameWindows

    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.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured