Thread: staticlink

  1. #1
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    Posts
    133

    staticlink

    I searched on google to find a way to add a staticlink to my project to add an email addy. The site I found was link.

    I followed the instructions listed there on the link, but have an error. The error has to do with my member(m_staMailto) is created in the CAboutDlg() and when i compile it says :

    m_staMailto undeclared identifier

    The example on the link uses it in the main dlg app and not in the aboutdlg. Any ideas?
    C++ Is Powerful
    I use C++
    There fore I am Powerful

  2. #2
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    Posts
    133
    Found my first problem, I had misspelled m_staMailto.

    Now I have another problem. In step 3) Create two CStaticLink members m_staURL1, m_staEmail using ClassWizard.

    I only created one for email. Changed m_staEmail to m_staMailto. I added the DDX in the proper place.

    Code:
    class CAboutDlg : public CDialog
    {
            public:
    	CAboutDlg();
    
    // Dialog Data
    	//{{AFX_DATA(CAboutDlg)
    	enum { IDD = IDD_ABOUTBOX };
    	CAboutDlg*	CStaticLink;
    	//}}AFX_DATA
    
    	// ClassWizard generated virtual function overrides
    	//{{AFX_VIRTUAL(CAboutDlg)
    	protected:
    	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    	//}}AFX_VIRTUAL
    
    // Implementation
    protected:
    	//{{AFX_MSG(CAboutDlg)
    	//}}AFX_MSG
    	DECLARE_MESSAGE_MAP()
    private:
    	CStaticLink m_staMailto;
    };
    But when I compile it says: 'CAboutDlg::CStaticLink':member from enclosing class is not a type name, static, or enumerator

    Any ideas on step 3)?
    C++ Is Powerful
    I use C++
    There fore I am Powerful

Popular pages Recent additions subscribe to a feed