From: Walter Deodiaus on 31 Dec 2005 21:46 I have a CView, and trying to create a dialog for user input. Unfortunately, I am getting the message & assert Error: no data exchange control with ID 110 Here is my code class CDlgGoto : public CDialog { // Construction public: CDlgGoto(CWnd* pParent = NULL); // standard constructor virtual ~CDlgGoto(); CString m_userGoto;// the number as input by the user //HWND m_DlgGoto; int m_iGoto;// goto line virtual int DoModal(); // Dialog Data //{{AFX_DATA(CDlgmsgqguiGoto) enum { IDD = IDD_DIALOG_GOTO };//110 // NOTE: the ClassWizard will add data members here //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDlgGoto) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CDlgGoto) afx_msg void OnChangeCDlgGoto(); afx_msg void OnGoto(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; extern CmyApp theApp; CDlgGoto::CDlgGoto(CWnd* pParent /*=NULL*/) : CDialog(CDlgGoto::IDD, pParent) { // one suggestion found in google AfxSetResourceHandle(theApp.m_hInstance); //{{AFX_DATA_INIT(CDlgGoto) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT m_userGoto= "";//0x } CDlgGoto::~CDlgGoto() { m_userGoto.ReleaseBuffer(0); // one suggestion found in google AfxSetResourceHandle(AfxGetApp()->m_hInstance) ; } void CDlgGoto::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDlgmsgqguiGoto) // NOTE: the ClassWizard will add DDX and DDV calls here DDX_Text(pDX, IDC_GOTO, m_userGoto); //}}AFX_DATA_MAP // assert and error here Error: no data exchange control with ID } BEGIN_MESSAGE_MAP(CDlgGoto, CDialog) //{{AFX_MSG_MAP(CDlgGoto) ON_EN_CHANGE(IDC_GOTO, OnChangeCDlgGoto) //}}AFX_MSG_MAP END_MESSAGE_MAP() //////////////////////////////////////////////////////////////////////////// / void CDlgGoto::OnChangeCDlgGotoGoto() { } int CDlgGoto::DoModal() { int irc = CDialog::DoModal(); // assert and error here Error: no data exchange control with ID return irc; }
From: Walter Deodiaus on 31 Dec 2005 22:14 Never mind, my id's were wrong.
|
Pages: 1 Prev: Compile errors in STL with VS8 Next: CAsyncSocket and Send |