<?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[Colorwert]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bestimme durch Auswahl über TColorDialog eine Farbe. Den Wert (TColorDialog-&gt;Color) speichere ich in eine Textdatei. Wenn ich den Wert wieder auslese und einem Panel zuweisen will komme ich aber nicht weiter. Wie übergebe ich das korrekt ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/205180/colorwert</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 18:23:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/205180.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Feb 2008 13:51:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 13:51:13 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bestimme durch Auswahl über TColorDialog eine Farbe. Den Wert (TColorDialog-&gt;Color) speichere ich in eine Textdatei. Wenn ich den Wert wieder auslese und einem Panel zuweisen will komme ich aber nicht weiter. Wie übergebe ich das korrekt ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453639</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453639</guid><dc:creator><![CDATA[Color]]></dc:creator><pubDate>Mon, 11 Feb 2008 13:51:13 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 13:56:50 GMT]]></title><description><![CDATA[<p>StringToColor?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453645</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453645</guid><dc:creator><![CDATA[wuschi]]></dc:creator><pubDate>Mon, 11 Feb 2008 13:56:50 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 14:11:59 GMT]]></title><description><![CDATA[<p>In meiner Textdatei steht:<br />
33023</p>
<pre><code>FILE *stream;
   String sValue;
   char msg[30];

   stream = fopen(&quot;c:\\bc.txt&quot;, &quot;r&quot;);
   while (fgets(msg, 30, stream) != NULL)
   {
      sValue=msg;
      Panel29-&gt;Color = StringToColor(sValue);
   }
</code></pre>
<p>Dann bekomme ich die Meldung, dass 33023 kein gültiger Integerwert sei.</p>
<p>Ich speichere das Ganze so:</p>
<pre><code>FILE *stream;
   String sValue;
   char msg[30];

   stream = fopen(&quot;c:\\bc.txt&quot;, &quot;w&quot;);
   sValue = (int) ColorDialog1-&gt;Color;
   //    sValue = ColorDialog1-&gt;Color;
   fprintf(stream, &quot;%s\n&quot;, sValue.c_str());
   fclose(stream);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1453659</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453659</guid><dc:creator><![CDATA[Color]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:11:59 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 14:13:37 GMT]]></title><description><![CDATA[<p>Mit ColorToString entpsrechend speichern und StringToColor wieder auslesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453664</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453664</guid><dc:creator><![CDATA[wuschi]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:13:37 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 14:16:39 GMT]]></title><description><![CDATA[<p>Hmm, 0x000... ist kein gültiger Integerwert<br />
clYellow ist kein gültiger Integerwert</p>
<p>Sorry, aber ich verstehseinfach nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453669</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453669</guid><dc:creator><![CDATA[Color]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:16:39 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 14:22:42 GMT]]></title><description><![CDATA[<p>Quelltext?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453677</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453677</guid><dc:creator><![CDATA[wuschi]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:22:42 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 14:26:36 GMT]]></title><description><![CDATA[<p>Speichern:</p>
<pre><code>FILE *stream;
   String sValue;
   char msg[30];

   stream = fopen(&quot;c:\\symbole\\bc.txt&quot;, &quot;w&quot;);
   sValue = ColorToString(ColorDialog1-&gt;Color);
   fprintf(stream, &quot;%s\n&quot;, sValue.c_str());
   fclose(stream);
</code></pre>
<p>Lesen:</p>
<pre><code>FILE *stream;
   String sValue;
   char msg[30];

   stream = fopen(&quot;c:\\symbole\\bc.txt&quot;, &quot;r&quot;);
   while (fgets(msg, 30, stream) != NULL)
   {
      sValue=msg;
      Panel29-&gt;Color = StringToColor(sValue);
   }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1453682</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453682</guid><dc:creator><![CDATA[Color]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:26:36 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 14:32:44 GMT]]></title><description><![CDATA[<p>Wieviele Farben willst denn da deinem Panel geben das eine while benutzt und vor allem deren leere Returnzeile mit einliest.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453693</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453693</guid><dc:creator><![CDATA[wuschi]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:32:44 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 14:38:33 GMT]]></title><description><![CDATA[<p>Nur eine, hab den Code geändert. War kopiert aus einer anderen Funktion. Das Integerproblem bleibt aber.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453701</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453701</guid><dc:creator><![CDATA[Color]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:38:33 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 14:50:35 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Mal mit reinen VCL-Mitteln (ist dem VCL/C-Mischmach eindeutig vorzuziehen)</p>
<pre><code class="language-cpp">TStringList* file = new TStringList;
  file-&gt;Add(ColorToString(clRed));
  file-&gt;SaveToFile(&quot;test.dat&quot;);
  delete file;
</code></pre>
<pre><code class="language-cpp">TStringList* file = new TStringList;
  file-&gt;LoadFromFile(&quot;test.dat&quot;);
  TColor cl = StringToColor(file-&gt;Strings[0]);
  delete file;
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453714</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453714</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:50:35 GMT</pubDate></item><item><title><![CDATA[Reply to Colorwert on Mon, 11 Feb 2008 15:02:53 GMT]]></title><description><![CDATA[<p>Vielen Dank, klappt super !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453720</guid><dc:creator><![CDATA[Color]]></dc:creator><pubDate>Mon, 11 Feb 2008 15:02:53 GMT</pubDate></item></channel></rss>