<?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[unbekannter Fehler]]></title><description><![CDATA[<p>Problem an sich ist nur die Switchanweisung. Nur wo? Kann zwar zeichnen. Aber listet Fehlermeldung auf. Irgendein Fehler in der afxwin2.inl.</p>
<pre><code class="language-cpp">CDlg dlg;
dlg.DoModal();

CClientDC dc(this); 

int a,b;
int x1,x2,y1,y2; 

RECT rect;

CBrush Blau(RGB(0,0,255));
CBrush Gelb(RGB(255,255,0)); 
CBrush Rot(RGB(255,0,0));

double lfAnzahl;
lfAnzahl=atof(dlg.m_strTreppenstufen);

for(a=0;a&lt;lfAnzahl;a++){
  for(b=0;b&lt;lfAnzahl;b++){
    x1=a*50+10;
    y1=b*50+10;
    x2=a*50+60;
    y2=b*50+60;
    dc.Rectangle(x1,y1,x2,y2);			 
  }
}	

switch(dlg.m_cmbAuswahl.GetCurSel()){
case 1:
  dlg.m_strAuswahl.Format(&quot;Blau&quot;); 
  dc.FillRect(&amp;rect, &amp;Blau);
  break;
case 2:
  dlg.m_strAuswahl.Format(&quot;Gelb&quot;); 
  dc.FillRect(&amp;rect, &amp;Gelb);
  break;
case 3:
  dlg.m_strAuswahl.Format(&quot;Rot&quot;);
  dc.FillRect(&amp;rect, &amp;Rot);
  break;
default:
  dlg.m_strAuswahl.Format(&quot;&quot;);
  AfxMessageBox(&quot;Falscheingabe&quot;);
  break;
}
</code></pre>
<p>(in CPP-Tags und mit ordentlichen Einrückungen sieht's doch gleich viel besser aus)</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/144772/unbekannter-fehler</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 18:27:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/144772.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 Apr 2006 14:50:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to unbekannter Fehler on Sat, 22 Apr 2006 08:34:34 GMT]]></title><description><![CDATA[<p>Problem an sich ist nur die Switchanweisung. Nur wo? Kann zwar zeichnen. Aber listet Fehlermeldung auf. Irgendein Fehler in der afxwin2.inl.</p>
<pre><code class="language-cpp">CDlg dlg;
dlg.DoModal();

CClientDC dc(this); 

int a,b;
int x1,x2,y1,y2; 

RECT rect;

CBrush Blau(RGB(0,0,255));
CBrush Gelb(RGB(255,255,0)); 
CBrush Rot(RGB(255,0,0));

double lfAnzahl;
lfAnzahl=atof(dlg.m_strTreppenstufen);

for(a=0;a&lt;lfAnzahl;a++){
  for(b=0;b&lt;lfAnzahl;b++){
    x1=a*50+10;
    y1=b*50+10;
    x2=a*50+60;
    y2=b*50+60;
    dc.Rectangle(x1,y1,x2,y2);			 
  }
}	

switch(dlg.m_cmbAuswahl.GetCurSel()){
case 1:
  dlg.m_strAuswahl.Format(&quot;Blau&quot;); 
  dc.FillRect(&amp;rect, &amp;Blau);
  break;
case 2:
  dlg.m_strAuswahl.Format(&quot;Gelb&quot;); 
  dc.FillRect(&amp;rect, &amp;Gelb);
  break;
case 3:
  dlg.m_strAuswahl.Format(&quot;Rot&quot;);
  dc.FillRect(&amp;rect, &amp;Rot);
  break;
default:
  dlg.m_strAuswahl.Format(&quot;&quot;);
  AfxMessageBox(&quot;Falscheingabe&quot;);
  break;
}
</code></pre>
<p>(in CPP-Tags und mit ordentlichen Einrückungen sieht's doch gleich viel besser aus)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1042025</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1042025</guid><dc:creator><![CDATA[Fehlcompiler]]></dc:creator><pubDate>Sat, 22 Apr 2006 08:34:34 GMT</pubDate></item><item><title><![CDATA[Reply to unbekannter Fehler on Fri, 21 Apr 2006 15:48:13 GMT]]></title><description><![CDATA[<p>Hast du die Anwendung schon mal durch debugt? Was für eine Fehlermeldung kommt genau?<br />
Bitte nächstes mal die Code Tags verwenden <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1042082</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1042082</guid><dc:creator><![CDATA[guenni81]]></dc:creator><pubDate>Fri, 21 Apr 2006 15:48:13 GMT</pubDate></item><item><title><![CDATA[Reply to unbekannter Fehler on Fri, 21 Apr 2006 18:22:33 GMT]]></title><description><![CDATA[<p>Nur mal so als Gedanke. Ich nehme an das der Fehler bei GetCurSel() auftritt, da der Dialog schon geschlossen wurde und das Handle der Listbox nicht mehr existiert. Versuch das mal in dem Dialog(CDlg) in der OnOK() eine lokale Variable des Dialoges zu mit dem Wert von GetCurSel zu setzen und diesen dann in der Switch zu benutzen.</p>
<p>Aber das ist eben nur so ein Gedanke, kann auch was anderes sein.</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1042175</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1042175</guid><dc:creator><![CDATA[CTecS]]></dc:creator><pubDate>Fri, 21 Apr 2006 18:22:33 GMT</pubDate></item><item><title><![CDATA[Reply to unbekannter Fehler on Sat, 22 Apr 2006 07:34:56 GMT]]></title><description><![CDATA[<p>Fehlcompiler schrieb:</p>
<blockquote>
<p>CDlg dlg;<br />
dlg.DoModal();<br />
&lt;snip&gt;<br />
switch(dlg.m_cmbAuswahl.GetCurSel()){</p>
</blockquote>
<p>Das geht nicht. Nach dem Aufruf des Dialoges ist das ComboBox Control wieder zerstört. Deshalb passiert ein ASSERT in der afxwin.inl! Das ist aber kein Compiler Fehler, wie Du schreibst.</p>
<p>Du musst also den Wert der ausgewählt wurde in DoDataExchange speichern lassen. Binde also eine Variable an diese ComboBox.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1042371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1042371</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sat, 22 Apr 2006 07:34:56 GMT</pubDate></item><item><title><![CDATA[Reply to unbekannter Fehler on Sat, 22 Apr 2006 08:19:17 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/35992">@Martin</a> Richter</p>
<p>Hatte ich nicht das selbe schon gepostet?</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1042386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1042386</guid><dc:creator><![CDATA[CTecS]]></dc:creator><pubDate>Sat, 22 Apr 2006 08:19:17 GMT</pubDate></item><item><title><![CDATA[Reply to unbekannter Fehler on Sat, 22 Apr 2006 08:52:09 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/19426">@CTecS</a>: Sorry. Ich habe den Thread wohl nicht vollständig gelesen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1042404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1042404</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sat, 22 Apr 2006 08:52:09 GMT</pubDate></item></channel></rss>