Error No Data Exchange Control With Id 0x
Forum Visual C++ & C++ Programming Visual C++ Programming Error: no data exchange control with ID 0x%04X If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register or Login before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 2 of 2 Thread: Error: no data exchange control with ID 0x%04X Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode April 13th, 2012,12:40 AM #1 itenggnaveen View Profile View Forum Posts Junior Member Join Date Apr 2009 Posts 21 Error: no data exchange control with ID 0x%04X Hi, I am new to MFC application. i have created dialog based application in which i have added one group box and put one editbox in group box. i set group box as parent to editbox(in OnInitDialog() fun) so that when do visible = FALSE, all controls in group box are also invisible. I called UpdateData(TRUE) to get the data from this edit box but application is getting crashed when i press F10 on updatedata(true) func. when comment the code where setting group box as parent to edit box then updatedata(true) works fine. please guide me over this issue Thanks in advance Reply With Quote April 13th, 2012,05:51 AM #2 ovidiucucu View Profile View Forum Posts Visit Homepage Moderator/Reviewer Power Poster Join Date Feb 2003 Location Iasi - Romania Posts 8,165 Re: Error: no data exchange control with ID 0x%04X DDX functions placed inside CDialog::DoDataExchange, which is called as a response to UpdateData, assume they are working with controls that are child of the dialog. For more details, see Dialog Data Exchange and related topics in MSDN Library. If you change the parent of whatever control, that leads in troubles and DDX fails. So, simply DO NOT do that! Additional "design" note: a group box is a control like any other Windows built-in control (in fact, it's of "button" class, having BS_GROUPBOX style) and is not designed to have other child controls. Ovidiu Cucu "When in Rome, do as Romans do." My latest articles: http://codexpert.ro/blog/author/ovidiu-cucu/ Reply With Quote Quick Navigation Visual C++ Programming Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Visual C++ & C++ Programming Visual C++ Programming Visual C++ FAQs C++ (Non Visual C++ Issues) C++ and WinAPI Managed C++ and C++/CLI Visual C++ Bugs & Fixes Graphics Programming Multithreading Network Pr
(Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) 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 the module out into an ATL/COM server and copied the dialog http://forums.codeguru.com/showthread.php?522912-Error-no-data-exchange-control-with-ID-0x-04X 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 to True in the dialog resource properties and I get more details into the error. The https://social.msdn.microsoft.com/Forums/SqlServer/en-US/2376b347-a79b-42af-950e-b3497dbdb553/cdialogcreate-fails-for-dialog-with-activex-control?forum=vcmfcatl 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 initialize OLE before creating the doalog? Visual C++ MVP Friday, November 09, 2012 12:02 AM Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choos
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 Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search https://www.experts-exchange.com/questions/22459040/MFC-debug-assertion-failed-error.html Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store 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 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 error no 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); // 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", error no data 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 method is called when you create (or display?) your dialog, for all controls having a member variable assigned. All such controls are enumerated in DDX_... macros. Have a look on the resource ID in this method, and what that correspnds to. 0 LVL 43 Overall: Level 43 System Programming 28 .NET Programming 24 Visual C++.NET 17 Message Active today Expert Comment by:AndyAinscow2007-03-19 What was the line of code you changed? 0 LVL 67 Overall: Level 67 .NET Programming 8 System Programming 3 Visual C++.NET 2 Message Active today Expert Comment by:Qlemo2007-03-20 ... the