Cannot access object created in another class

Discussion in 'MFC' started by Neil1947, Aug 2, 2010.

  1. Neil1947

    Neil1947 New Member

    Joined:
    Aug 2, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Help! I have a program that create a status bar in the view frame window. The CStatusBar object is created in the frame class. eg: CStatusBar Ob;

    I need to access this object in a method of the view class to apply text to the status bar, but cannot figure out how. When i create an object of the frame class in the view class, all I have access to is the frame class other data members and not the CStatusBar object created there.

    Any code will help. (not theory) since have not done this before. I am thinking a pointer or reference is in order here, but don't know how to code it.

    Thank anyone...
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice