<?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[Struktur TVITEM  binär in Datei speichern und laden]]></title><description><![CDATA[<p>Hi,<br />
ich möchte eine Struktur speichern und wieder laden:</p>
<p>es funktioniert aber nicht. Kann das daran liegen das der Compiler die Struktur nicht 1 zu 1 packt. oder was könnte das sein?</p>
<pre><code class="language-cpp">//diese Strukur
typedef struct tagTVITEM{
    UINT      mask;
    HTREEITEM hItem;
    UINT      state;
    UINT      stateMask;
    LPTSTR    pszText;
    int       cchTextMax;
    int       iImage;
    int       iSelectedImage;
    int       cChildren;
    LPARAM    lParam;
} TVITEM, FAR *LPTVITEM;

//TVITEM t;
//speichern so:
//Prfile=fopen(PRFILE,&quot;wb&quot;);
fwrite(&amp;t, sizeof(TVITEM), 1, Prfile );

//laden so:
//Prfile=fopen(PRFILE,&quot;rb&quot;);
fread(&amp;t, sizeof(TVITEM), 1, Prfile );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/151001/struktur-tvitem-binär-in-datei-speichern-und-laden</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 19:44:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/151001.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Jun 2006 09:13:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Struktur TVITEM  binär in Datei speichern und laden on Thu, 22 Jun 2006 09:13:11 GMT]]></title><description><![CDATA[<p>Hi,<br />
ich möchte eine Struktur speichern und wieder laden:</p>
<p>es funktioniert aber nicht. Kann das daran liegen das der Compiler die Struktur nicht 1 zu 1 packt. oder was könnte das sein?</p>
<pre><code class="language-cpp">//diese Strukur
typedef struct tagTVITEM{
    UINT      mask;
    HTREEITEM hItem;
    UINT      state;
    UINT      stateMask;
    LPTSTR    pszText;
    int       cchTextMax;
    int       iImage;
    int       iSelectedImage;
    int       cChildren;
    LPARAM    lParam;
} TVITEM, FAR *LPTVITEM;

//TVITEM t;
//speichern so:
//Prfile=fopen(PRFILE,&quot;wb&quot;);
fwrite(&amp;t, sizeof(TVITEM), 1, Prfile );

//laden so:
//Prfile=fopen(PRFILE,&quot;rb&quot;);
fread(&amp;t, sizeof(TVITEM), 1, Prfile );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1082761</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082761</guid><dc:creator><![CDATA[BILL]]></dc:creator><pubDate>Thu, 22 Jun 2006 09:13:11 GMT</pubDate></item><item><title><![CDATA[Reply to Struktur TVITEM  binär in Datei speichern und laden on Thu, 22 Jun 2006 09:18:11 GMT]]></title><description><![CDATA[<p>Was heißt denn &quot;funktioniert aber nicht&quot; genau?</p>
<p>Und warum willst du so etwas überhaupt speichern?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1082766</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082766</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Thu, 22 Jun 2006 09:18:11 GMT</pubDate></item><item><title><![CDATA[Reply to Struktur TVITEM  binär in Datei speichern und laden on Thu, 22 Jun 2006 10:34:14 GMT]]></title><description><![CDATA[<p>In LVITEM binär abzuspeichern ist so ziemlich für die Füsse.</p>
<p>Was nützt Dir ein Handle, dass nur für die Laufzeit gültig ist, was nützt Dir ein Zeiger, der auch nur in diesem Moment gültig ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1082801</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082801</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 22 Jun 2006 10:34:14 GMT</pubDate></item><item><title><![CDATA[Reply to Struktur TVITEM  binär in Datei speichern und laden on Thu, 22 Jun 2006 11:02:36 GMT]]></title><description><![CDATA[<p>Ja , ist schon klar letzten Endes werde ich auch nur die States und die Imgaeindexe speichern.<br />
Das Problem hat sich aber schon erledigt der Fehler lag an ganz anderer Stelle.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1082814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1082814</guid><dc:creator><![CDATA[BILL]]></dc:creator><pubDate>Thu, 22 Jun 2006 11:02:36 GMT</pubDate></item></channel></rss>