Locked Unable to update DoDatExchange

  • mercoledì 22 agosto 2012 20:04
     
     

    Hi,

    After a a few years inactivity I try to pick up C++ programmng again, using Visual Studio 2008. I try to create a simple class derived from CDialog, with some CEdit controls.

    When I try to add a control control variable (CEdit type), Visual Studio gives an error message "Unable toUpdate DoDataExchage" and then refuses to create the variable.

    What am I doing wrong? In other VisualStudios it always worked without problems using the class wizard, but now, even in a simple test application ...

    Thanks for your advice,

    Rudolf


Tutte le risposte

  • mercoledì 22 agosto 2012 21:39
     
      Contiene codice

    There is couple of reasons for this behavior.

    The obvious one is that your header and/or implementation file is read only.

    If you have IE 8 or higher installed, it affects behavior of VS due to new security implemented in the browser. Browser control is used by visual studio various dialogs.

    Try set Internet Settings security zone as follows: copy the text below to a text file and save it with .reg extension.

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1000]
    
    "1207"=dword:00000000
    

    Double click the saved file to update registry, start/restart visual studio and try again.

    I hope this is going to fix your problem.


    JohnCz Please consider voting if you find this post helpful.

  • venerdì 31 agosto 2012 08:32
     
     Con risposta Contiene codice

    I have faced similar issue. For solving this i just add those entries manually in DoDataExchnage()

    // In header file
    class CMyDilaog: public CDilaog
    {
      private:
       CEdit MyEdit;
    }
    
    // In cpp file
    void CListCtrlDlg::DoDataExchange(CDataExchange* pDX)
    {
        CDialog::DoDataExchange(pDX);
        DDX_Control(pDX, IDC_EDIT2, MyEdit);
    }
    

    This issue is probably because of file is readonly.



    Thanks, Renjith V R

    • Contrassegnato come risposta Rudolf Heijink sabato 15 settembre 2012 13:11
    •  
  • venerdì 7 settembre 2012 10:00
    Moderatore
     
     

    Hi,

    Have you tried John's suggestion? How is it going with your issue?

    I temporarily mark John's reply as answer.

    If you disagree, please unmark it, and post your doubt.

    Regards,


    Damon Zheng [MSFT]
    MSDN Community Support | Feedback to us

  • sabato 15 settembre 2012 13:10
     
     Con risposta
    Thanks a lot for trying to help me. Unfortunately, both of your suggestions did not work. Finally I tried creating a variable in another project, which did not give any errors. I then decided to to send the whole dialog to the trash and start again. This solved the problem. No idea why.

    Rudolf http://www.hollandhiking.nl a site for hiking and bicycle tourism in the Netehrlands.

    • Contrassegnato come risposta Rudolf Heijink sabato 15 settembre 2012 13:11
    •  
  • sabato 15 settembre 2012 13:12
     
     
    Thanks Renjith, I recreated the dialog which solved the problem, no idea why this worked.

    Rudolf http://www.hollandhiking.nl a site for hiking and bicycle tourism in the Netehrlands.