1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cannot access object created in another class

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

  1. Neil1947

    Neil1947 New Member

    Aug 2, 2010
    Likes Received:
    Trophy Points:
    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