<?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[Dynamisches Dropdownmenu]]></title><description><![CDATA[<p>Hallo, ich habe mir über einen Dialog die Eigenschaften für ein Dropdownmenu festgelegt. Wie z.B. Höhe, Breite usw. Unter anderem auch die Einträge in der Liste. Wenn nun von meiner SDI Anwendung auf dei Dialog variable zugreifen will bekommen ich immer eine Fehlermeldung .<br />
Was mache verkehrt ?</p>
<pre><code class="language-cpp">CDialog_ComboBox dlg;
	if (dlg.DoModal() == 1)
	{
		if (pruefe_koordinaten(dlg.m_breite,dlg.m_hoehe))
		{
			m_combo[m_anzahl_combo].Create(CBS_DROPDOWN|WS_VISIBLE,CRect(m_x,m_y,m_x +dlg.m_breite,m_y + dlg.m_hoehe),this,ID_COMBO);
			m_combo[m_anzahl_combo].EnableWindow(false);
			m_anzahl_combo++;
			if (m_anzahl_combo == m_max)
				m_drop_menu = false;

			schreibe_koordinaten(dlg.m_breite,dlg.m_hoehe);
			CString eintrag;
		TRACE(&quot;\n%i\n&quot;,dlg.m_vorschau.GetCount());
			for (int i = 0; i &lt; dlg.m_vorschau.GetCount(); i++)
			{
				TRACE(&quot;\n%i\n&quot;,i);
				dlg.m_vorschau.GetLBText(i,eintrag);
				m_combo[m_anzahl_combo].AddString(eintrag);
			}
		}
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/157852/dynamisches-dropdownmenu</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 18:39:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157852.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Aug 2006 06:18:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dynamisches Dropdownmenu on Wed, 30 Aug 2006 06:18:17 GMT]]></title><description><![CDATA[<p>Hallo, ich habe mir über einen Dialog die Eigenschaften für ein Dropdownmenu festgelegt. Wie z.B. Höhe, Breite usw. Unter anderem auch die Einträge in der Liste. Wenn nun von meiner SDI Anwendung auf dei Dialog variable zugreifen will bekommen ich immer eine Fehlermeldung .<br />
Was mache verkehrt ?</p>
<pre><code class="language-cpp">CDialog_ComboBox dlg;
	if (dlg.DoModal() == 1)
	{
		if (pruefe_koordinaten(dlg.m_breite,dlg.m_hoehe))
		{
			m_combo[m_anzahl_combo].Create(CBS_DROPDOWN|WS_VISIBLE,CRect(m_x,m_y,m_x +dlg.m_breite,m_y + dlg.m_hoehe),this,ID_COMBO);
			m_combo[m_anzahl_combo].EnableWindow(false);
			m_anzahl_combo++;
			if (m_anzahl_combo == m_max)
				m_drop_menu = false;

			schreibe_koordinaten(dlg.m_breite,dlg.m_hoehe);
			CString eintrag;
		TRACE(&quot;\n%i\n&quot;,dlg.m_vorschau.GetCount());
			for (int i = 0; i &lt; dlg.m_vorschau.GetCount(); i++)
			{
				TRACE(&quot;\n%i\n&quot;,i);
				dlg.m_vorschau.GetLBText(i,eintrag);
				m_combo[m_anzahl_combo].AddString(eintrag);
			}
		}
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1127293</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1127293</guid><dc:creator><![CDATA[basti_1984]]></dc:creator><pubDate>Wed, 30 Aug 2006 06:18:17 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Dropdownmenu on Wed, 30 Aug 2006 07:01:10 GMT]]></title><description><![CDATA[<p>was mir da jetzt auffällt bzw gänzlich unverständlich ist<br />
warum ist die m_combo (also die CComboBox) ne array??<br />
du hast doch blos eine combobox auf dem dialog oder?</p>
<blockquote>
<p>ich habe mir über einen Dialog die Eigenschaften für <strong>ein Dropdownmenu</strong> festgelegt</p>
</blockquote>
<p>mfg<br />
LowFly</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1127320</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1127320</guid><dc:creator><![CDATA[LowFly]]></dc:creator><pubDate>Wed, 30 Aug 2006 07:01:10 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Dropdownmenu on Wed, 30 Aug 2006 07:42:49 GMT]]></title><description><![CDATA[<p>Nein habe ich auch nicht erwähnt . ich kann ca. 100 Boxen e3rstellen daher das Array.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1127351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1127351</guid><dc:creator><![CDATA[basti_1984]]></dc:creator><pubDate>Wed, 30 Aug 2006 07:42:49 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Dropdownmenu on Wed, 30 Aug 2006 09:12:02 GMT]]></title><description><![CDATA[<p>1. Wo bekommst du die Fehlermeldung?<br />
2. Was für eine Fehlermeldung?<br />
3. Was sind das noch für Funktionen?</p>
<p>Du hast doch inzwischen wirklich genügend Hilfefragen gestellt, um zu wissen, dass die Helfer mehr Infos brauchen. Es kommt eine Fehlermeldung, sagt einfach gar nichts aus. Kommt die Fehlermeldung im Compiler? Zur Laufzeit? Ist es ein Assert? Zeilennummer, Datei? An welcher Stelle im Code? Oder eine Speicherzugriffverletzung? Oder was auch immer?</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1127434</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1127434</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Wed, 30 Aug 2006 09:12:02 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Dropdownmenu on Wed, 30 Aug 2006 11:01:35 GMT]]></title><description><![CDATA[<p>Ist ein Speicherzugriffsproblem, die restölichen Funktionen sind uninteressant und dienen lediglich der Darstellung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1127459</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1127459</guid><dc:creator><![CDATA[basti_1984]]></dc:creator><pubDate>Wed, 30 Aug 2006 11:01:35 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Dropdownmenu on Thu, 31 Aug 2006 07:09:35 GMT]]></title><description><![CDATA[<p>basti_1984 schrieb:</p>
<blockquote>
<pre><code class="language-cpp">m_combo[m_anzahl_combo].Create(CBS_DROPDOWN|WS_VISIBLE,CRect(m_x,m_y,m_x +dlg.m_breite,m_y + dlg.m_hoehe),this,ID_COMBO);
		m_combo[m_anzahl_combo].EnableWindow(false);
		m_anzahl_combo++; // hier hochzählen

...

		m_combo[m_anzahl_combo].AddString(eintrag); // ... und hier ins Klo greifen
</code></pre>
</blockquote>
<p>Mach doch mal das</p>
<pre><code class="language-cpp">m_anzahl_combo++;
</code></pre>
<p>hinter das</p>
<pre><code class="language-cpp">m_combo[m_anzahl_combo].AddString(eintrag);
</code></pre>
<p>Ausserdem bezweifle ich, dass es eine gute Idee ist, beim Create() immmer dieselbe ID für das Control zu nehmen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1128102</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1128102</guid><dc:creator><![CDATA[jencas]]></dc:creator><pubDate>Thu, 31 Aug 2006 07:09:35 GMT</pubDate></item></channel></rss>