<?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[ComboBox - Abhängig voriger wahl Strings änder??]]></title><description><![CDATA[<p>Hi Leute!</p>
<p>Ich hab zwar ein einfaches beispiel, aber leider dazu ein Problem.</p>
<p>Ich hab zwei Comboboxen.</p>
<p><strong>ComboBox1</strong></p>
<p>Name: ICD_COMBO1<br />
Variable: m_ctrLand<br />
Typ: Value<br />
Content: CString</p>
<p>Der DATA Inhalt von Properties: Deutschland<br />
Schweiz<br />
Österreich</p>
<p><strong>ComboBox2</strong></p>
<p>Name: ICD_COMBO2<br />
Varibale: m_ctrStadt<br />
Typ: Variabel &lt;-- oder so was ähnliches<br />
Content: ComboBox</p>
<p>Der DATA Inhalt von Properties ist <em>leeeer!</em></p>
<p><strong>Meine Frage an Euch:</strong></p>
<p>Wie kriege ich es hin, dass wenn man aus COMBO1 &quot;Deutschland&quot; wählt, dass dann in COMBO2 drei Städte wie &quot;Hamburg, Freiburg, Dresden&quot; auswählbar sind?</p>
<p>Bei Schweiz und Österreich das gleiche.</p>
<p>Folgendes hab ich schon gmacht:</p>
<pre><code>if(m_ctrLand == &quot;Deutschland&quot;)
	{
		m_ctrStadt.SetWindowText(&quot;Hamburg\nBerlin\nFreiburg\nMünchen\nKöln&quot;);
	}
		if(m_ctrLand == &quot;Schweiz&quot;)
	{
		m_ctrStadt.SetWindowText(&quot;Bern\nZürich\nAarau\nOlten\nLuzern&quot;);
	}
			if(m_ctrLand == &quot;Österreich&quot;)
	{
			m_ctrStadt.SetWindowText(&quot;Wien\nGraz\nLauterbach\nSalzburg&quot;)
	}
</code></pre>
<p>Nun, also m_ctrStadt.SetWindowText(&quot;STADT&quot;); funktioniert nicht, COMBO2 bleibt leer! Hab keine Ahnung, wirklich nich, wie man so etwas macht...</p>
<p>mfg<br />
Pro</p>
<p>PS: Dank zum Vorraus<br />
---Restarter in VC++--- (Seit 3Jahren nimma programmiert und fast alles vergessen!) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/48850/combobox-abhängig-voriger-wahl-strings-änder</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 02:55:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/48850.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Sep 2003 22:28:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ComboBox - Abhängig voriger wahl Strings änder?? on Fri, 12 Sep 2003 22:28:36 GMT]]></title><description><![CDATA[<p>Hi Leute!</p>
<p>Ich hab zwar ein einfaches beispiel, aber leider dazu ein Problem.</p>
<p>Ich hab zwei Comboboxen.</p>
<p><strong>ComboBox1</strong></p>
<p>Name: ICD_COMBO1<br />
Variable: m_ctrLand<br />
Typ: Value<br />
Content: CString</p>
<p>Der DATA Inhalt von Properties: Deutschland<br />
Schweiz<br />
Österreich</p>
<p><strong>ComboBox2</strong></p>
<p>Name: ICD_COMBO2<br />
Varibale: m_ctrStadt<br />
Typ: Variabel &lt;-- oder so was ähnliches<br />
Content: ComboBox</p>
<p>Der DATA Inhalt von Properties ist <em>leeeer!</em></p>
<p><strong>Meine Frage an Euch:</strong></p>
<p>Wie kriege ich es hin, dass wenn man aus COMBO1 &quot;Deutschland&quot; wählt, dass dann in COMBO2 drei Städte wie &quot;Hamburg, Freiburg, Dresden&quot; auswählbar sind?</p>
<p>Bei Schweiz und Österreich das gleiche.</p>
<p>Folgendes hab ich schon gmacht:</p>
<pre><code>if(m_ctrLand == &quot;Deutschland&quot;)
	{
		m_ctrStadt.SetWindowText(&quot;Hamburg\nBerlin\nFreiburg\nMünchen\nKöln&quot;);
	}
		if(m_ctrLand == &quot;Schweiz&quot;)
	{
		m_ctrStadt.SetWindowText(&quot;Bern\nZürich\nAarau\nOlten\nLuzern&quot;);
	}
			if(m_ctrLand == &quot;Österreich&quot;)
	{
			m_ctrStadt.SetWindowText(&quot;Wien\nGraz\nLauterbach\nSalzburg&quot;)
	}
</code></pre>
<p>Nun, also m_ctrStadt.SetWindowText(&quot;STADT&quot;); funktioniert nicht, COMBO2 bleibt leer! Hab keine Ahnung, wirklich nich, wie man so etwas macht...</p>
<p>mfg<br />
Pro</p>
<p>PS: Dank zum Vorraus<br />
---Restarter in VC++--- (Seit 3Jahren nimma programmiert und fast alles vergessen!) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/352635</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352635</guid><dc:creator><![CDATA[Programmer]]></dc:creator><pubDate>Fri, 12 Sep 2003 22:28:36 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox - Abhängig voriger wahl Strings änder?? on Fri, 12 Sep 2003 22:33:44 GMT]]></title><description><![CDATA[<p>SetWindowText?<br />
Nein - CComboBox::AddString.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/352636</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352636</guid><dc:creator><![CDATA[Oliver]]></dc:creator><pubDate>Fri, 12 Sep 2003 22:33:44 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox - Abhängig voriger wahl Strings änder?? on Fri, 12 Sep 2003 22:37:45 GMT]]></title><description><![CDATA[<p>Nemesyzz schrieb:</p>
<blockquote>
<p>SetWindowText?<br />
Nein - CComboBox::AddString.</p>
</blockquote>
<p>und wie?</p>
<p>CComboBox::AddString.m_strStadt(&quot;Test&quot;); ??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/352638</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352638</guid><dc:creator><![CDATA[Programmer]]></dc:creator><pubDate>Fri, 12 Sep 2003 22:37:45 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox - Abhängig voriger wahl Strings änder?? on Fri, 12 Sep 2003 22:46:25 GMT]]></title><description><![CDATA[<p>Programmer schrieb:</p>
<blockquote>
<p>Seit 3Jahren nimma programmiert und fast alles vergessen!</p>
</blockquote>
<p>Wie war. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>1. Möglichkeit:<br />
Membervariable zu deiner ComboBox anlegen (Control - nicht Value!)</p>
<pre><code class="language-cpp">m_myCombo.AddString(&quot;Berlin&quot;);
</code></pre>
<p>2. Möglichkeit:</p>
<pre><code class="language-cpp">CComboBox* combo = static_cast&lt;CCbomboBox*&gt; (GetDlgItem(IDC_MYCOMBO));
combo-&gt;AddString(&quot;Berlin&quot;);
</code></pre>
<p>Vorher CComboBox::ResetContent() aufrufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/352641</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352641</guid><dc:creator><![CDATA[Oliver]]></dc:creator><pubDate>Fri, 12 Sep 2003 22:46:25 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox - Abhängig voriger wahl Strings änder?? on Fri, 12 Sep 2003 22:52:33 GMT]]></title><description><![CDATA[<p>Vielen Dank, doch da wird NIX angezeigt!</p>
<p>Bei beiden möglichkeiten nicht, auch wenn ich UpdateData(TRUE); oder so noch hinschreibe...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/352644</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/352644</guid><dc:creator><![CDATA[Programmer]]></dc:creator><pubDate>Fri, 12 Sep 2003 22:52:33 GMT</pubDate></item><item><title><![CDATA[Reply to ComboBox - Abhängig voriger wahl Strings änder?? on Mon, 15 Sep 2003 08:34:15 GMT]]></title><description><![CDATA[<p>du musst noch einen Eintrag auswählen.</p>
<p>m_cbx.SelCurSel(0);</p>
<p>Dann sollte der erste Eintrag gewählt sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/353788</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/353788</guid><dc:creator><![CDATA[estartu]]></dc:creator><pubDate>Mon, 15 Sep 2003 08:34:15 GMT</pubDate></item></channel></rss>