Error No Data Exchange Control With Id 0x 04x
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up CDialog::Create fails for dialog with ActiveX control up vote 3 down vote favorite 1 I have a module that creates a modeless dialog containing an ActiveX control. This module was part of an MFC EXE application and the creation of the dialog worked fine. Recently, I moved the module out into an ATL/COM server and copied the dialog resource from the EXE into the COM server. When trying to create the modeless dialog using CDialog::Create() an error happens. I debugged into CDialog::Create and noticed that it fails in ::CreateDialogIndirect() which returns NULL and GetLastError returns 0. I changed the "No Fail Create" flag to True in the dialog resource properties and I get more details into the error. The problem happens in the dialog's DoDataExchange() within the DDX_Control macro. This calls into the CDataExchange::PrepareCtrl() with the control's resource ID as follows: HWND CDataExchange::PrepareCtrl(int nIDC) { ASSERT(nIDC != 0); ASSERT(nIDC != -1); // not allowed HWND hWndCtrl; COleControlSite* pSite = NULL; m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); if (hWndCtrl == NULL) { // Could be a windowless OCX pSite = m_pDlgWnd->GetOleControlSite(nIDC); if (pSite == NULL) { TRACE(traceAppMsg, 0, "Error: no data exchange control with ID 0x%04X.\n", nIDC); ASSERT(FALSE); AfxThrowNotSupportedException(); } } m_idLastControl = nIDC; m_bEditLastControl = FALSE; // not an edit item by default return hWndCtrl; } The call to the function m_pDlgWn
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeLibraryLearnDownloadsTroubleshootingCommunityForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by: CDialog::Create fails for dialog with ActiveX control Archived Forums V > Visual C++ MFC and ATL Question 0 Sign in to vote Hi, I have a module that creates a modeless dialog containing an ActiveX control. This module was part of an MFC EXE application and the creation of the dialog worked fine. Recently, I moved http://stackoverflow.com/questions/13292166/cdialogcreate-fails-for-dialog-with-activex-control the module out into an ATL/COM server and copied the dialog resource from the EXE into the COM server. When trying to create the modeless dialog using CDialog::Create() an error happens. I debugged intoCDialog::Create and noticed that it fails in::CreateDialogIndirect() which returns NULL and GetLastError returns 0. I changed the "No Fail Create" flag https://social.msdn.microsoft.com/Forums/SqlServer/en-US/2376b347-a79b-42af-950e-b3497dbdb553/cdialogcreate-fails-for-dialog-with-activex-control?forum=vcmfcatl to True in the dialog resource properties and I get more details into the error. The problem happens in the dialog'sDoDataExchange() within theDDX_Control macro. This calls into theCDataExchange::PrepareCtrl() with the control's resource ID as follows: HWND CDataExchange::PrepareCtrl(int nIDC) { ASSERT(nIDC != 0); ASSERT(nIDC != -1); // not allowed HWND hWndCtrl; COleControlSite* pSite = NULL; m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); if (hWndCtrl == NULL) { // Could be a windowless OCX pSite = m_pDlgWnd->GetOleControlSite(nIDC); if (pSite == NULL) { TRACE(traceAppMsg, 0, "Error: no data exchange control with ID 0x%04X.\n", nIDC); ASSERT(FALSE); AfxThrowNotSupportedException(); } } m_idLastControl = nIDC; m_bEditLastControl = FALSE; // not an edit item by default return hWndCtrl; } The call to the functionm_pDlgWnd->GetOleControlSite() fails for the resource ID passed. By the way, the resource ID is the control's ID. Any suggestions on why this works inside the EXE and fails in the COM server? Thanks Thursday, November 08, 2012 2:44 PM All replies 0 Sign in to vote Did you initia
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance https://www.experts-exchange.com/questions/22459040/MFC-debug-assertion-failed-error.html Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store http://www.developpez.net/forums/d7167/c-cpp/outils-c-cpp/visual-cpp/mfc/mfc-error-no-data-exchange-control/ Headlines Experts Exchange > Questions > MFC - debug assertion failed error Want to Advertise Here? Solved MFC - debug assertion failed error Posted on 2007-03-19 .NET Programming Visual C++.NET System error no Programming 2 Verified Solutions 8 Comments 2,372 Views Last Modified: 2013-11-26 Hello, My MFC project was working ok. I made a change to a line of code and it then started giving me a debug assertion failed error! It points to the ASSERT ( FALSE) line of this funtion in dlgData.cpp HWND CDataExchange::PrepareCtrl(int nIDC) { ASSERT(nIDC != 0); ASSERT(nIDC != -1); error no data // not allowed HWND hWndCtrl; COleControlSite* pSite = NULL; m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); if (hWndCtrl == NULL) { // Could be a windowless OCX pSite = m_pDlgWnd->GetOleControlSite(nIDC); if (pSite == NULL) { TRACE(traceAppMsg, 0, "Error: no data exchange control with ID 0x%04X.\n", nIDC); ASSERT(FALSE); AfxThrowNotSupportedException(); } } m_idLastControl = nIDC; m_bEditLastControl = FALSE; // not an edit item by default return hWndCtrl; } Does anyone know what would cause this error and what should I do to get rid of it!? Thanks -D 0 Question by:indacrypt Facebook Twitter LinkedIn Google LVL 67 Active today Best Solution byQlemo The corresonding control is not existing (anymore), maybe you renamed the resource ID. This method is called when you create (or display?) your dialog, for all controls having a member variable assigned. Go to Solution 8 Comments LVL 67 Overall: Level 67 .NET Programming 8 System Programming 3 Visual C++.NET 2 Message Active today Accepted Solution by:Qlemo2007-03-19 The corresonding control is not existing (anymore), maybe you renamed the resource ID. This me
Merise UML JavaPlateforme et langage Java Java Java Web Spring Android Eclipse NetBeans .NETMicrosoft Framework .NET Microsoft DotNET Visual Studio ASP.NET C# VB.NET Windows Phone Microsoft Azure Dv. WebDveloppement Web et Webmarketing Dveloppement Web AJAX Apache ASP CSS Dart Flash / Flex JavaScript PHP Ruby & Rails TypeScript Web smantique Webmarketing (X)HTML EDIEnvironnements de Dveloppement Intgr EDI 4D Delphi Eclipse LabVIEW NetBeans MATLAB Scilab Visual Studio WinDev Visual Basic 6 Lazarus Qt Creator ProgrammationProgrammation et langages de programmation applicatifs Programmation Dbuter - Algorithmique 2D - 3D - Jeux Assembleur C C++ Go Objective C Pascal Perl Python Swift Qt XML Autres SGBDSystmes de Gestion de Bases de Donnes SGBD & SQL 4D Access Big Data DB2 Firebird InterBase MySQL NoSQL PostgreSQL Oracle Sybase SQL-Server OfficeBureautique pour l'entreprise Microsoft Office Access Excel Word Outlook PowerPoint SharePoint Microsoft Project OpenOffice & LibreOffice Solutions d'entrepriseAutres logiciels pour l'entreprise Solutions d'entreprise Big Data BPM Business Intelligence ERP / PGI CRM SAS Cloud Computing SAP Microsoft BizTalk Server Talend IBM Bluemix ApplicationsApplications logicielles Applications Libres & Open Source OpenOffice & LibreOffice Projets MobilesLogiciels et matriels mobiles Mobiles Android iOS Windows Phone SystmesLogiciels et matriels systmes Systmes Windows Linux Scurit Hardware Mac Raspberry Pi Rseau Green IT Systmes Embarqus Virtualisation Programmation Algorithmique 2D-3D-Jeux Assembleur C C++ Go Objective C Pascal Perl Python Swift Qt XML Autres Forums C++ FAQ C++ Tutoriels C++ Livres C++ Outils & compilateurs C++ Bibliothques C++ Sources C++ Qt S'inscrire Aide Quoi de neuf ? Forum Actions Marquer les forums comme lus Bugs & Suggestions Rseau social Groupes Liste des utilisateurs FAQ forum Voir l'quipe du site Blogs Agenda Rgles Blogs Projets Recherche avance Index du forum C et C++ Outils pour C & C++ Visual C++ MFC [MFC] Error: no data exchange control + Rpondre la discussion Discussion: [MFC] Error: no data exchange control Outils de la discussion Afficher une version imprimable S'abonner cette discussion… Affichage Mode linaire Choisi