<?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[Warnung bei LoadChartFromFile]]></title><description><![CDATA[<p>Hallo,<br />
ich nutze seit einiger Zeit die TeeChart komponenten. Bin soweit sehr zufrieden damit <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":-)"
      alt="🙂"
    /></p>
<p>Um nun auch gespeicherte Diagramme zu öffnen brauche ich die Methode LoadChartFromFile</p>
<p>In der hilfe dazu steht folgendes:</p>
<pre><code>procedure LoadChartFromFile(Var AChart: TCustomChart; Const AFileName: String);

Unit
TeeStore

Description
This method will import the TeeChart 'tee' template Chart from the specified File Name, applying all properties of the template to the Chart. 

Tee templates are an efficient way to save and load runtime Chart appearance and may be saved at runtime using the TChart.SaveChartToFile.

Optionally, Tee templates can contain Series data values.

The usage of this procedure obligues to cast the Chart parameter, to return the correct new pointer address:

Uses TeeStore;
LoadChartFromFile( TCustomChart( Chart1 ), 'mychart.tee' );
</code></pre>
<p>Leider sind die meisten Beispiele nur in Delphi...<br />
Ich habe obiges wie folgt umgesetzt:</p>
<pre><code class="language-cpp">TChart *tmpchart;

  tmpchart  =  new TChart(this);
  tmpchart-&gt;Parent = this;

  LoadChartFromFile( tmpchart, filename );

  Chart1-&gt;Visible = false;
  Chart1-&gt;Enabled = false;

  tmpchart-&gt;Show();
</code></pre>
<p>Das Funktioniert mittlerweile auch wunderbar, trotzdem bekomme ich beim kompilieren folgende Warnung:</p>
<p>[C++ Warnung] Main.cpp(153): W8030 Temporäre Größe für Parameter 'AChart' in Aufruf von '_fastcall LoadChartFromFile(TCustomChart * &amp;,const AnsiString)' verwendet</p>
<p>Ich habe wirklich schon vieles ausprobiert, jedoch bekomme ich die Warnung nicht weg <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Normalerweise würde man ja denken ich müsste mit<br />
TCustomChart *tmpchart; das Objekt definieren, jedoch klappt dann der Ladevorgang gar nicht mehr.</p>
<p>Ich hoffe mir kann eventuell jemand bei diesem Problem helfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p>Gruß Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/127916/warnung-bei-loadchartfromfile</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Jul 2026 09:23:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/127916.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Nov 2005 18:06:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Warnung bei LoadChartFromFile on Mon, 28 Nov 2005 18:06:59 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich nutze seit einiger Zeit die TeeChart komponenten. Bin soweit sehr zufrieden damit <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":-)"
      alt="🙂"
    /></p>
<p>Um nun auch gespeicherte Diagramme zu öffnen brauche ich die Methode LoadChartFromFile</p>
<p>In der hilfe dazu steht folgendes:</p>
<pre><code>procedure LoadChartFromFile(Var AChart: TCustomChart; Const AFileName: String);

Unit
TeeStore

Description
This method will import the TeeChart 'tee' template Chart from the specified File Name, applying all properties of the template to the Chart. 

Tee templates are an efficient way to save and load runtime Chart appearance and may be saved at runtime using the TChart.SaveChartToFile.

Optionally, Tee templates can contain Series data values.

The usage of this procedure obligues to cast the Chart parameter, to return the correct new pointer address:

Uses TeeStore;
LoadChartFromFile( TCustomChart( Chart1 ), 'mychart.tee' );
</code></pre>
<p>Leider sind die meisten Beispiele nur in Delphi...<br />
Ich habe obiges wie folgt umgesetzt:</p>
<pre><code class="language-cpp">TChart *tmpchart;

  tmpchart  =  new TChart(this);
  tmpchart-&gt;Parent = this;

  LoadChartFromFile( tmpchart, filename );

  Chart1-&gt;Visible = false;
  Chart1-&gt;Enabled = false;

  tmpchart-&gt;Show();
</code></pre>
<p>Das Funktioniert mittlerweile auch wunderbar, trotzdem bekomme ich beim kompilieren folgende Warnung:</p>
<p>[C++ Warnung] Main.cpp(153): W8030 Temporäre Größe für Parameter 'AChart' in Aufruf von '_fastcall LoadChartFromFile(TCustomChart * &amp;,const AnsiString)' verwendet</p>
<p>Ich habe wirklich schon vieles ausprobiert, jedoch bekomme ich die Warnung nicht weg <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Normalerweise würde man ja denken ich müsste mit<br />
TCustomChart *tmpchart; das Objekt definieren, jedoch klappt dann der Ladevorgang gar nicht mehr.</p>
<p>Ich hoffe mir kann eventuell jemand bei diesem Problem helfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p>Gruß Christian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/929137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/929137</guid><dc:creator><![CDATA[chbr]]></dc:creator><pubDate>Mon, 28 Nov 2005 18:06:59 GMT</pubDate></item><item><title><![CDATA[Reply to Warnung bei LoadChartFromFile on Thu, 01 Dec 2005 13:53:02 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Mach mal das hier</p>
<pre><code class="language-cpp">TChart *tmpchart;

tmpchart  =  new TChart(this);
tmpchart-&gt;Parent = this;

LoadChartFromFile( dynamic_cast&lt;TCustomChart*&gt;(tmpchart), filename );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/931385</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/931385</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 01 Dec 2005 13:53:02 GMT</pubDate></item></channel></rss>