<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem mit DoDataExchange]]></title><description><![CDATA[<p>Hallo zusammen.</p>
<p>Ich habe wahrscheinlich ein kleines Problem mit der o.g. CDialog-Methode. Und zwar wollte ich, nur mal zum Test, einem Textfeld eine Variable &quot;von Hand&quot; zuweisen. Dabei bin ich folgendermaßen vorgegangen:</p>
<p>Im Header:</p>
<pre><code>CEdit myEdit;
int m_iTextZahl;
</code></pre>
<p>In der Quelltextdatei in der Methode DoDataExchange():</p>
<pre><code>DDX_Text(pDX, IDC_MYTEXT, m_iTextZahl);
</code></pre>
<p>Das Kompilieren funktioniert ja noch, wenn ich den Code allerdings ausführe, dann läuft gleich zu Beginn ein Asseration-Fault auf. Die Datei, die den Assert auslöst, ist eine von Microsoft generierte namens dlgdata.cpp. Die Fehlermeldung lautet dann: no data exchange control with ID <em>TextfeldID</em>.<br />
Wie weise ich denn mein Textfeld auf das Datenaustauschobjekt hin.</p>
<p>Danke Euch für's Reinschauen</p>
<p>Gruß<br />
_Bongo</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/122316/problem-mit-dodataexchange</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 05:35:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/122316.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Oct 2005 12:26:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit DoDataExchange on Mon, 03 Oct 2005 12:26:31 GMT]]></title><description><![CDATA[<p>Hallo zusammen.</p>
<p>Ich habe wahrscheinlich ein kleines Problem mit der o.g. CDialog-Methode. Und zwar wollte ich, nur mal zum Test, einem Textfeld eine Variable &quot;von Hand&quot; zuweisen. Dabei bin ich folgendermaßen vorgegangen:</p>
<p>Im Header:</p>
<pre><code>CEdit myEdit;
int m_iTextZahl;
</code></pre>
<p>In der Quelltextdatei in der Methode DoDataExchange():</p>
<pre><code>DDX_Text(pDX, IDC_MYTEXT, m_iTextZahl);
</code></pre>
<p>Das Kompilieren funktioniert ja noch, wenn ich den Code allerdings ausführe, dann läuft gleich zu Beginn ein Asseration-Fault auf. Die Datei, die den Assert auslöst, ist eine von Microsoft generierte namens dlgdata.cpp. Die Fehlermeldung lautet dann: no data exchange control with ID <em>TextfeldID</em>.<br />
Wie weise ich denn mein Textfeld auf das Datenaustauschobjekt hin.</p>
<p>Danke Euch für's Reinschauen</p>
<p>Gruß<br />
_Bongo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/885052</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/885052</guid><dc:creator><![CDATA[_Bongo]]></dc:creator><pubDate>Mon, 03 Oct 2005 12:26:31 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Wed, 05 Oct 2005 05:35:45 GMT]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ist die &quot;IDC_MYTEXT&quot; dem Edit Control auch zugewiesen? In der Fehlermeldung steht irgendwas &quot;no data exchange control with ID TextfeldID&quot;. Sonst würde er ja irgendwas mit MYTEXT schreiben. Ist außerdem die Variable m_iTextZahl als Member des Edit Controls deklariert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/885303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/885303</guid><dc:creator><![CDATA[AndyDD]]></dc:creator><pubDate>Wed, 05 Oct 2005 05:35:45 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Wed, 05 Oct 2005 17:20:46 GMT]]></title><description><![CDATA[<p>Zitat: Ist die &quot;IDC_MYTEXT&quot; dem Edit Control auch zugewiesen?</p>
<p>Wenn mich nicht alles täuscht, dann werden ID und Control mittels Create-Methode miteinander verbunden. Das habe ich auch getan (Textfeld wird auch angezeigt)</p>
<p>Zitat:Ist außerdem die Variable m_iTextZahl als Member des Edit Controls deklariert?</p>
<p>Habe ich das nicht bereits mit der Zeile:</p>
<pre><code>DDX_Text(pDX, IDC_MYTEXT, m_iTextZahl);
</code></pre>
<p>getan?</p>
<p>Was kann ich denn da noch vergessen haben? Oder denke ich mit den oben geschreibenen Zeilen falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/885882</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/885882</guid><dc:creator><![CDATA[_Bongo]]></dc:creator><pubDate>Wed, 05 Oct 2005 17:20:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Thu, 06 Oct 2005 05:30:39 GMT]]></title><description><![CDATA[<p>Sorry, hatte ich überlesen. Ja die IDD wird mittels Create() übergeben. Vielleicht postest Du mal die ganze Methode....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/886111</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/886111</guid><dc:creator><![CDATA[AndyDD]]></dc:creator><pubDate>Thu, 06 Oct 2005 05:30:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Thu, 06 Oct 2005 09:41:07 GMT]]></title><description><![CDATA[<p>Existiert das Feld IDC_MYTEXT in der Dialogresource?</p>
<p>Der Fehler in dlgdata.cpp Zeile 43 (oder 44 je nach C++ Version) kommt, wenn zwar der Eintrag im DoDataExchange, aber das Edit-Feld als eigentliche Resource im Dialog gar nicht vorhanden ist. Also erst den Dialog mit allen Elementen zeichnen, dann per Hand die Member-Variablen und Eintrag in DoDataExcange hinzufügen.</p>
<p>Tester2</p>
]]></description><link>https://www.c-plusplus.net/forum/post/886268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/886268</guid><dc:creator><![CDATA[Tester2]]></dc:creator><pubDate>Thu, 06 Oct 2005 09:41:07 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Thu, 06 Oct 2005 15:03:21 GMT]]></title><description><![CDATA[<p>Die ID habe ich den Dialogressourcen bereits zugefügt. Ich poste den ganzen Code morgen mal. Habe alles auf'm Notebook und das hab' ich gerad' nicht dabei.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/886494</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/886494</guid><dc:creator><![CDATA[_Bongo]]></dc:creator><pubDate>Thu, 06 Oct 2005 15:03:21 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Sat, 08 Oct 2005 11:04:04 GMT]]></title><description><![CDATA[<p>Hier sind die Codezeilen:</p>
<p>Ort: testApp.h</p>
<pre><code>private:
	CEdit myText;
	int m_iTest;
</code></pre>
<p>Methode: OnInitDialog()<br />
Ort: testApp.cpp</p>
<pre><code>myText.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, CRect(20, 200, 80, 220), this, 121);
</code></pre>
<p>Methode: DoDataExchange(CDataExchange* pDX)<br />
Ort: testApp.cpp</p>
<pre><code>DDX_Text(pDX, IDC_EDIT1, m_iTest);

CDialog::DoDataExchange(pDX);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/887623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/887623</guid><dc:creator><![CDATA[_Bongo]]></dc:creator><pubDate>Sat, 08 Oct 2005 11:04:04 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Mon, 10 Oct 2005 05:03:33 GMT]]></title><description><![CDATA[<p>Das Einzige, was ich noch vermuten könnte:<br />
Stimmen der letzte Parameter in Create (nID=121) und der Wert für IDC_EDIT1 (in resoure.h) überein???</p>
<p>Tester2</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888519</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888519</guid><dc:creator><![CDATA[Tester2]]></dc:creator><pubDate>Mon, 10 Oct 2005 05:03:33 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Mon, 10 Oct 2005 05:49:39 GMT]]></title><description><![CDATA[<p>Ich glaube, da ist noch irgendein Code-Müll von Dir übrig. Ich habe das Szenario mal nachgestellt und bin über eine ähnliche (wenn nicht gleiche) Problematik gefallen.</p>
<p>Ich habe erstmals eine Edit-Control per Hand eingefügt (IDC_MYTEXT) und diesem händisch die DDX-Methode vervollständigt.</p>
<p>Anschließend erzeugte ich ein weiteres Edit-Control, daß ich per Create-Methode dem Dialog hinzufügte.</p>
<p>Bis nun alles OK ... aber jetzt ... als ordnungsliebender Mensch habe ich das Edit-Control, daß ich zuvor per D&amp;D dem Dialog hinzugefügt habe entfernt und siehe da</p>
<p>Error: no data exchange control with ID 0x03ED.</p>
<p>und zwar in dlgdata.cpp</p>
<p>Nun, was ist da passiert!</p>
<p>CDialog::OnInitDialog ruft UpdateData auf und dieses die DDX-Methode Deiner Klasse.</p>
<p>In Deiner (und auch meiner) DDX-Methode weise ich nun m_iTextZahl dem Control mit der ID (IDC_MYTEXT) in der DoDataExchange-Methode zu, EINEM CONTROL, WELCHES ERST SPÄTER IN DER OnInitDialog-Methode ERZEUGT WIRD!!!!!!</p>
<p>Nun, einem Control, daß bis dato noch gar nicht existiert kann auch keine Variable zugewiesen bekommen. Da schimpft die MFC, und zwar mit Recht!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888527</guid><dc:creator><![CDATA[ChrisPlusPlus]]></dc:creator><pubDate>Mon, 10 Oct 2005 05:49:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Mon, 10 Oct 2005 14:39:15 GMT]]></title><description><![CDATA[<p>An Tester2:<br />
Stimmt - ich habe den falschen ID-Bezeichner (IDC_EDIT1) eingetragen. Allerdings lief derselbe Fehler nach einer Korrektur wieder auf.</p>
<p>An ChrisPlusPlus:<br />
Ich habe den Code genau da eingefügt, wo auskommentiert steht: hier Code eintragen. Aber der Lösungsvorschlag hört sich logisch an. Werde das heute Abend mal ausprobieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888936</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888936</guid><dc:creator><![CDATA[_Bongo]]></dc:creator><pubDate>Mon, 10 Oct 2005 14:39:15 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Tue, 11 Oct 2005 12:53:27 GMT]]></title><description><![CDATA[<p>Stimmt ChrisPlusPlus,<br />
an die variante habe ich gar nicht gedacht.</p>
<p>Tester2</p>
]]></description><link>https://www.c-plusplus.net/forum/post/889597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/889597</guid><dc:creator><![CDATA[Tester2]]></dc:creator><pubDate>Tue, 11 Oct 2005 12:53:27 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DoDataExchange on Wed, 12 Oct 2005 09:41:12 GMT]]></title><description><![CDATA[<p>Bin Deinem Vorschlag mal nachgegangen und habe den Aufruf der Create-Methode vor den Aufruf von InitDialog der Basisklasse geschoben. Hat funktioniert - Danke.</p>
<p>Gruß<br />
Bongo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890392</guid><dc:creator><![CDATA[_Bongo]]></dc:creator><pubDate>Wed, 12 Oct 2005 09:41:12 GMT</pubDate></item></channel></rss>