<?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[List Control]]></title><description><![CDATA[<p>Ich habe einen Dialog erstellt in die ich eine ListControl-Komponente eingefügt habe. Das Handle habe ich bereits mit GetDlgItem() ausgelesen. Nun möchte ich diese Liste auch benutzen können.</p>
<p>Was für Funktionen gibt es um ListControl-Komponenten zu verwalten? Oder gibt es eine Möglichkeit den Handle einer CListCtrl-Klasse zuzuordnen, um dann mit einer Instanz dieser Klasse arbeiten zu können?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/51393/list-control</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 15:45:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/51393.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 09 Oct 2003 13:43:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to List Control on Thu, 09 Oct 2003 13:43:30 GMT]]></title><description><![CDATA[<p>Ich habe einen Dialog erstellt in die ich eine ListControl-Komponente eingefügt habe. Das Handle habe ich bereits mit GetDlgItem() ausgelesen. Nun möchte ich diese Liste auch benutzen können.</p>
<p>Was für Funktionen gibt es um ListControl-Komponenten zu verwalten? Oder gibt es eine Möglichkeit den Handle einer CListCtrl-Klasse zuzuordnen, um dann mit einer Instanz dieser Klasse arbeiten zu können?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/369155</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/369155</guid><dc:creator><![CDATA[Sven2]]></dc:creator><pubDate>Thu, 09 Oct 2003 13:43:30 GMT</pubDate></item><item><title><![CDATA[Reply to List Control on Fri, 10 Oct 2003 11:42:25 GMT]]></title><description><![CDATA[<p>Die einfachste Variante ist, ein CListCtrl zuzuordnen (mittels DDX, bzw. in OnInitDialog ein CWnd::Attach, in OnDestroy ein Detach)</p>
<p>Du kannst aber auch</p>
<pre><code>CWnd * lcWnd = GetDlgItem(IDC_MY_LIST);
CListCtrl * lc = (CListCtrl *) lcWnd;
</code></pre>
<p>letzteres geht, weil CListCtrl keine eigenen Datenmember (gegenüber CWnd) hat, sondern die relevanten Funktionen praktisch nur SendMessage aufrufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/369778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/369778</guid><dc:creator><![CDATA[peterchen]]></dc:creator><pubDate>Fri, 10 Oct 2003 11:42:25 GMT</pubDate></item><item><title><![CDATA[Reply to List Control on Fri, 10 Oct 2003 11:43:18 GMT]]></title><description><![CDATA[<p>Der Zeiger ist aber nur temporär (d.h. wird im nöchsten OnIdle gelöscht, also nicht aufheben)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/369782</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/369782</guid><dc:creator><![CDATA[peterchen]]></dc:creator><pubDate>Fri, 10 Oct 2003 11:43:18 GMT</pubDate></item><item><title><![CDATA[Reply to List Control on Fri, 10 Oct 2003 14:38:56 GMT]]></title><description><![CDATA[<p>Ich bin zwar für jede Hilfe dankbar, aber der Code hat mehr Probleme verursacht, als gelöst.</p>
<p>Ich habe auch folgendes versucht:<br />
1. Ich habe eine CListCtrl-Instanz deklariert.<br />
2. Ich habe versucht dieser Klasse ein HWND-Handle zuzuweisen (einmal mittels CListCtrl.Attach() und einmal mit einer direkten Zuweisung auf die Variable CListCtrl.m_hWnd) und bekam wieder merkwürdige Exceptions</p>
]]></description><link>https://www.c-plusplus.net/forum/post/369950</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/369950</guid><dc:creator><![CDATA[Sven2]]></dc:creator><pubDate>Fri, 10 Oct 2003 14:38:56 GMT</pubDate></item><item><title><![CDATA[Reply to List Control on Fri, 10 Oct 2003 14:44:41 GMT]]></title><description><![CDATA[<p>a) CWnd hat einen Member CWnd * GetDlgItem(UINT id) - apso</p>
<p>pMyDialogWithList-&gt;GetDlgItem(IDC_LC)</p>
<p>Die globale GetDlgItem bekommt als ersten Parameter den HWND des Parents.</p>
<p>b)<br />
Attach überprüft das a) das HWND ein gültiges Window Handle ist und b) es keine feste CWnd-Instanz gibt, die dem HWND zugeordnet ist</p>
]]></description><link>https://www.c-plusplus.net/forum/post/369960</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/369960</guid><dc:creator><![CDATA[peterchen]]></dc:creator><pubDate>Fri, 10 Oct 2003 14:44:41 GMT</pubDate></item><item><title><![CDATA[Reply to List Control on Fri, 10 Oct 2003 15:22:20 GMT]]></title><description><![CDATA[<p>Ich komme nach wie vor nicht damit klar!</p>
<p>Das ist mein Code:</p>
<pre><code>CWnd		Window;
CListCtrl		*ListControl = NULL;

if (Window.Attach(hDialog) == FALSE)
	return FALSE;

ListControl = (CListCtrl*)Window.GetDlgItem(LIST_ID);
if (ListControl == NULL)
	return FALSE;

ListControl-&gt;InsertColumn(0, &quot;Spalte&quot;, LVCFMT_LEFT, 100);
</code></pre>
<p>Vielleicht habe ich ja irgendwas falsch verstanden, oder nicht beachtet, aber eigentlich kann das ja nicht so kompliziert sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/369973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/369973</guid><dc:creator><![CDATA[Sven2]]></dc:creator><pubDate>Fri, 10 Oct 2003 15:22:20 GMT</pubDate></item><item><title><![CDATA[Reply to List Control on Sun, 12 Oct 2003 10:25:00 GMT]]></title><description><![CDATA[<p>Leg Dir doch einfach eine Variable vom Typ CListCtrl an, welche mit Deinem ListControl-Element auf dem Dialogfeld verknüpft ist und benutze diese für die Operationen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/370648</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/370648</guid><dc:creator><![CDATA[MuehBln]]></dc:creator><pubDate>Sun, 12 Oct 2003 10:25:00 GMT</pubDate></item><item><title><![CDATA[Reply to List Control on Sun, 12 Oct 2003 10:38:31 GMT]]></title><description><![CDATA[<p>Was ist hDialog, und ist dem nicht schin eine Dialog-Klasse zugeordnet?</p>
<p>Warum willst du nicht den &quot;normalen&quot; Weg gehen und einen CListCtrl-Member zum Dialog hnzufügen (üner class Wizard, da kriegst du gleich den DDX eintrag)?</p>
<p>An welcher Stelle geht es denn schief?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/370652</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/370652</guid><dc:creator><![CDATA[peterchen (anon)]]></dc:creator><pubDate>Sun, 12 Oct 2003 10:38:31 GMT</pubDate></item></channel></rss>