Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Unable to update DoDataExchange method : VS 2000 Project converted to Visual Studio 2008 or VS 2010

Unable to update DoDataExchange method : VS 2000 Project converted to Visual Studio 2008 or VS 2010

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiohelpcsharpannouncement
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    glitteringsound
    wrote on last edited by
    #1

    Hi, I am having a problem. I have a project "MicroSIP" which is used for SIP based call voice over IP. I am running it into VS 2010 and I need to customize it according to my need. For this as soon as I edit the main dialog ( Dialer ) and add some other controls ( like edit control of CEdit) and add member variable for from wizard of "Add Variable", it shows the message "unable to update DoDataExchange method". More over if getting reference of newly placed "Edit Control" in the program , it has NULL pointer or undefined reference. Anybody having any idea about this to resolve or some way around to resolve the issue. I am having extremely trouble for solving this scanario. Regards Usman Khalil

    A B 2 Replies Last reply
    0
    • G glitteringsound

      Hi, I am having a problem. I have a project "MicroSIP" which is used for SIP based call voice over IP. I am running it into VS 2010 and I need to customize it according to my need. For this as soon as I edit the main dialog ( Dialer ) and add some other controls ( like edit control of CEdit) and add member variable for from wizard of "Add Variable", it shows the message "unable to update DoDataExchange method". More over if getting reference of newly placed "Edit Control" in the program , it has NULL pointer or undefined reference. Anybody having any idea about this to resolve or some way around to resolve the issue. I am having extremely trouble for solving this scanario. Regards Usman Khalil

      A Offline
      A Offline
      Albert Holguin
      wrote on last edited by
      #2

      Sometimes the wizards get out of whack is some of the commented text that is in the header/source files is removed. Why not add the control by hand? It's really not that difficult. This is the problem with people using wizards... when they fail, you're left with no recourse. If you learn what it is the wizard does, then you don't have to depend on it.

      G 1 Reply Last reply
      0
      • A Albert Holguin

        Sometimes the wizards get out of whack is some of the commented text that is in the header/source files is removed. Why not add the control by hand? It's really not that difficult. This is the problem with people using wizards... when they fail, you're left with no recourse. If you learn what it is the wizard does, then you don't have to depend on it.

        G Offline
        G Offline
        glitteringsound
        wrote on last edited by
        #3

        Unfortunately adding it by hand also didn't work at all. See the problem: It crashes now inside DDX_Control(pDX, IDC_EDIT_Address, MacAddressEditCtrl ); where IDC_EDIT_Address is the id and MAcAddressEditctrl is CWnd object. oid AFXAPI DDX_Control(CDataExchange* pDX, int nIDC, CWnd& rControl) { if ((rControl.m_hWnd == NULL) && (rControl.GetControlUnknown() == NULL)) // not subclassed yet { ASSERT(!pDX->m_bSaveAndValidate); pDX->PrepareCtrl(nIDC); ////it crashes here...and inside it int the long run inside of code somehere..it calls GetOleControlSite() and there it is observed that m_pCtrlCont is NULL. HWND hWndCtrl; pDX->m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); if ((hWndCtrl != NULL) && !rControl.SubclassWindow(hWndCtrl)) { ASSERT(FALSE); // possibly trying to subclass twice? AfxThrowNotSupportedException(); } ifndef _AFX_NO_OCC_SUPPORT else { if (hWndCtrl == NULL) { if (pDX->m_pDlgWnd->GetOleControlSite(nIDC) != NULL) { rControl.AttachControlSite(pDX->m_pDlgWnd, nIDC); } } else { // If the control has reparented itself (e.g., invisible control), // make sure that the CWnd gets properly wired to its control site. if (pDX->m_pDlgWnd->m_hWnd != ::GetParent(rControl.m_hWnd)) rControl.AttachControlSite(pDX->m_pDlgWnd); } } endif //!_AFX_NO_OCC_SUPPORT } }

        A 1 Reply Last reply
        0
        • G glitteringsound

          Unfortunately adding it by hand also didn't work at all. See the problem: It crashes now inside DDX_Control(pDX, IDC_EDIT_Address, MacAddressEditCtrl ); where IDC_EDIT_Address is the id and MAcAddressEditctrl is CWnd object. oid AFXAPI DDX_Control(CDataExchange* pDX, int nIDC, CWnd& rControl) { if ((rControl.m_hWnd == NULL) && (rControl.GetControlUnknown() == NULL)) // not subclassed yet { ASSERT(!pDX->m_bSaveAndValidate); pDX->PrepareCtrl(nIDC); ////it crashes here...and inside it int the long run inside of code somehere..it calls GetOleControlSite() and there it is observed that m_pCtrlCont is NULL. HWND hWndCtrl; pDX->m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); if ((hWndCtrl != NULL) && !rControl.SubclassWindow(hWndCtrl)) { ASSERT(FALSE); // possibly trying to subclass twice? AfxThrowNotSupportedException(); } ifndef _AFX_NO_OCC_SUPPORT else { if (hWndCtrl == NULL) { if (pDX->m_pDlgWnd->GetOleControlSite(nIDC) != NULL) { rControl.AttachControlSite(pDX->m_pDlgWnd, nIDC); } } else { // If the control has reparented itself (e.g., invisible control), // make sure that the CWnd gets properly wired to its control site. if (pDX->m_pDlgWnd->m_hWnd != ::GetParent(rControl.m_hWnd)) rControl.AttachControlSite(pDX->m_pDlgWnd); } } endif //!_AFX_NO_OCC_SUPPORT } }

          A Offline
          A Offline
          Albert Holguin
          wrote on last edited by
          #4

          Where's the code where you describe MacAddressEditCtrl? Are you positive IDC_EDIT_Address exists in the resources? When you try to access this variable, are you sure there's an instance of the dialog created? Has OnInitDialog() been called already? If I had to guess, you're probably trying to use the control before it has been created.

          G 1 Reply Last reply
          0
          • A Albert Holguin

            Where's the code where you describe MacAddressEditCtrl? Are you positive IDC_EDIT_Address exists in the resources? When you try to access this variable, are you sure there's an instance of the dialog created? Has OnInitDialog() been called already? If I had to guess, you're probably trying to use the control before it has been created.

            G Offline
            G Offline
            glitteringsound
            wrote on last edited by
            #5

            Thanks Albert. As you pointed out and I realized that I placed and written the code of another OnInitDialog.. It was main dialog's control of whole I was trying to manipulate of another dialog's code. Thanks

            1 Reply Last reply
            0
            • G glitteringsound

              Hi, I am having a problem. I have a project "MicroSIP" which is used for SIP based call voice over IP. I am running it into VS 2010 and I need to customize it according to my need. For this as soon as I edit the main dialog ( Dialer ) and add some other controls ( like edit control of CEdit) and add member variable for from wizard of "Add Variable", it shows the message "unable to update DoDataExchange method". More over if getting reference of newly placed "Edit Control" in the program , it has NULL pointer or undefined reference. Anybody having any idea about this to resolve or some way around to resolve the issue. I am having extremely trouble for solving this scanario. Regards Usman Khalil

              B Offline
              B Offline
              Binu MD
              wrote on last edited by
              #6

              Could you upload the header and cpp file of dialog class ?

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups