<?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[Tree nachträglich im Programm erstellen]]></title><description><![CDATA[<p>hallo,</p>
<p>ich möchte einen Tree nachträglich im Programm erstellen und nicht<br />
da wo ich meinen Dialog sonst vom aussehen her bearbeiten kann.</p>
<p>dazu habe ich folgenden code:</p>
<pre><code>DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_EX_CLIENTEDGE |
                      TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS |
                          TVS_DISABLEDRAGDROP | TVS_INFOTIP | WS_TABSTOP;

CTreeCtrl test;
test.Create(dwStyle,CRect(10, 100, 200, 200),this,0);
test.ShowWindow(SW_SHOW);
</code></pre>
<p>aber es wird einfach nichts angezeigt :-|</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/150322/tree-nachträglich-im-programm-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 07:15:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/150322.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Jun 2006 10:56:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tree nachträglich im Programm erstellen on Thu, 15 Jun 2006 10:56:13 GMT]]></title><description><![CDATA[<p>hallo,</p>
<p>ich möchte einen Tree nachträglich im Programm erstellen und nicht<br />
da wo ich meinen Dialog sonst vom aussehen her bearbeiten kann.</p>
<p>dazu habe ich folgenden code:</p>
<pre><code>DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_EX_CLIENTEDGE |
                      TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS |
                          TVS_DISABLEDRAGDROP | TVS_INFOTIP | WS_TABSTOP;

CTreeCtrl test;
test.Create(dwStyle,CRect(10, 100, 200, 200),this,0);
test.ShowWindow(SW_SHOW);
</code></pre>
<p>aber es wird einfach nichts angezeigt :-|</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078082</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078082</guid><dc:creator><![CDATA[K.Wuestkamp]]></dc:creator><pubDate>Thu, 15 Jun 2006 10:56:13 GMT</pubDate></item><item><title><![CDATA[Reply to Tree nachträglich im Programm erstellen on Thu, 15 Jun 2006 12:31:02 GMT]]></title><description><![CDATA[<p>Das ShowWindow(...) kannst Du Dir sparen, dafür sorgt bereits WS_VISIBLE. Dafür solltest Du</p>
<pre><code class="language-cpp">CTreeCtrl test;
</code></pre>
<p>in den Konstruktor der Elternklasse verlagern. Denn dein <strong>test</strong> haucht sein <strong>Leben auf dem Stack der Funktion</strong> an der nächsten <strong>}</strong> aus. Es sollte aber erst durch den Destruktor der Elternklasse beseitigt werden. <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>Hier der Beweis:</p>
<pre><code class="language-cpp">void CTreeCtrlTestDlg::OnButton1() 
{
        DWORD dwStyle = WS_VISIBLE | TVS_HASLINES | TVS_HASBUTTONS | 
		              TVS_LINESATROOT | TVS_SHOWSELALWAYS | TVS_DISABLEDRAGDROP | 
									TVS_INFOTIP | WS_TABSTOP;

        CRect rect(5,5,100,100);

        CTreeCtrl testCtrl;

        testCtrl.Create( dwStyle, rect, this, 0);
        testCtrl.InsertItem(&quot;Hallo ich lebe noch&quot;);
        //testCtrl.ShowWindow(SW_SHOW);
        MessageBox(&quot;Jetzt ist CTreeCtrl bzw. das von ihm erzeugte CTreeView sichtbar &quot;);
        Sleep(2000); 
        MessageBox(&quot;CTreeCtrl und CTreeView sagen nun good bye&quot;);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1078129</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078129</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Thu, 15 Jun 2006 12:31:02 GMT</pubDate></item><item><title><![CDATA[Reply to Tree nachträglich im Programm erstellen on Thu, 15 Jun 2006 12:32:34 GMT]]></title><description><![CDATA[<p>achso <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>ja danke stimmt <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/1078141</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078141</guid><dc:creator><![CDATA[K.Wuestkamp]]></dc:creator><pubDate>Thu, 15 Jun 2006 12:32:34 GMT</pubDate></item></channel></rss>