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

Forward Reference... to a CDialog Class

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

  1. Alphadan

    Alphadan New Member

    Aug 30, 2010
    Likes Received:
    Trophy Points:

    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


    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