Forward Reference... to a CDialog Class

Discussion in 'MFC' started by Alphadan, Aug 30, 2010.

  1. Alphadan

    Alphadan New Member

    Joined:
    Aug 30, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi

    All i want is to make a forward reference to a class that inherits from CDialog Class.

    This is the class

    CClienteDlg : public CDialog

    All i want is to be able to create a reference pointer to the CClienteDlg to be able to call one of its methhoods from another class.

    The reason i cant just include the file is cause inclusion recursion. since both classes need to comunicate eachother.

    When i tried to to do the forward reference this way

    class CClienteDlg;

    extern CClienteDlg* DlgMain; // then i declare the global variable to the reference pointer

    But i get 2 errors:


    error C2065: 'IDD_Main_Dlg' : undeclared identifier

    and

    error C2057: expected constant expression


    on this line

    enum { IDD = IDD_Main_Dlg };

    I been stuck in this for over a week =/, help is apreciated.
     

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