<?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[ListView leer]]></title><description><![CDATA[<p>hallo, ich habe eine Dialogbox als Ressource mit einer ListView. Nun will ich die ListView als Liste mit Spaltenüberschrift haben, also LVS_REPORT setzen und<br />
ListView_InsertColumn aufrufen... denkste. Es tut sich rein gar nix an der Liste, es bleibt einfach eine leere weisse Fläche. Was mach ich falsch? Hier ein Codeausschnitt:</p>
<pre><code class="language-cpp">BOOL CALLBACK MainDialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	static HWND hList; //Handle für ListView
	LVCOLUMN lvc;      //Struktur für InsertColumn
	switch(message)
	{
	case WM_INITDIALOG:
		hList=GetDlgItem(hDlg,IDC_LIST);  //Handle holen
		SetWindowLong(hList,GWL_STYLE,(GetWindowLong(hList,GWL_STYLE) &amp; ~LVS_TYPEMASK)| LVS_REPORT);  //ListView Style auf LVS_REPORT
		lvc.mask=LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
		lvc.fmt=LVCFMT_LEFT;
		lvc.cchTextMax=40;
		lvc.cx=100;
		lvc.pszText=&quot;Überschrift&quot;;
		ListView_InsertColumn(hList,0,&amp;lvc); //Spaltenüberschrift einfügen
		return TRUE;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/100160/listview-leer</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 17:38:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/100160.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Feb 2005 11:12:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 11:12:59 GMT]]></title><description><![CDATA[<p>hallo, ich habe eine Dialogbox als Ressource mit einer ListView. Nun will ich die ListView als Liste mit Spaltenüberschrift haben, also LVS_REPORT setzen und<br />
ListView_InsertColumn aufrufen... denkste. Es tut sich rein gar nix an der Liste, es bleibt einfach eine leere weisse Fläche. Was mach ich falsch? Hier ein Codeausschnitt:</p>
<pre><code class="language-cpp">BOOL CALLBACK MainDialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	static HWND hList; //Handle für ListView
	LVCOLUMN lvc;      //Struktur für InsertColumn
	switch(message)
	{
	case WM_INITDIALOG:
		hList=GetDlgItem(hDlg,IDC_LIST);  //Handle holen
		SetWindowLong(hList,GWL_STYLE,(GetWindowLong(hList,GWL_STYLE) &amp; ~LVS_TYPEMASK)| LVS_REPORT);  //ListView Style auf LVS_REPORT
		lvc.mask=LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
		lvc.fmt=LVCFMT_LEFT;
		lvc.cchTextMax=40;
		lvc.cx=100;
		lvc.pszText=&quot;Überschrift&quot;;
		ListView_InsertColumn(hList,0,&amp;lvc); //Spaltenüberschrift einfügen
		return TRUE;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/714429</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714429</guid><dc:creator><![CDATA[reclin]]></dc:creator><pubDate>Fri, 04 Feb 2005 11:12:59 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 11:24:39 GMT]]></title><description><![CDATA[<p>rückgabewerte und GetLastError() sind deine freunde <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/714436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714436</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 04 Feb 2005 11:24:39 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 11:34:23 GMT]]></title><description><![CDATA[<p>Die Rückgabewerte passen, GetLastError() liefert auch nix brauchbares</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714448</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714448</guid><dc:creator><![CDATA[reclin]]></dc:creator><pubDate>Fri, 04 Feb 2005 11:34:23 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 11:39:24 GMT]]></title><description><![CDATA[<p>Was liefert denn GetLastError()?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714454</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714454</guid><dc:creator><![CDATA[MichaM.]]></dc:creator><pubDate>Fri, 04 Feb 2005 11:39:24 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 11:41:52 GMT]]></title><description><![CDATA[<p>MichaM. schrieb:</p>
<blockquote>
<p>Was liefert denn GetLastError()?</p>
</blockquote>
<p>steht doch da <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> <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="😉"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> [ironie]weisst du nicht was das für ein wert ist[/ironie]</p>
<p>reclin schrieb:</p>
<blockquote>
<p>GetLastError() liefert auch nix brauchbares</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/714455</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714455</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 04 Feb 2005 11:41:52 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 11:45:10 GMT]]></title><description><![CDATA[<p>Na was liefert GetLastError() wohl, wenns nicht brauchbar ist?<br />
0 natürlich</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714457</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714457</guid><dc:creator><![CDATA[reclin]]></dc:creator><pubDate>Fri, 04 Feb 2005 11:45:10 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 11:47:32 GMT]]></title><description><![CDATA[<p>reclin schrieb:</p>
<blockquote>
<p>Na was liefert GetLastError() wohl, wenns nicht brauchbar ist?<br />
0 natürlich</p>
</blockquote>
<p>nein, 0 ist sehr wohl brauchbar.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714458</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714458</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 04 Feb 2005 11:47:32 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 12:37:49 GMT]]></title><description><![CDATA[<p>Ist es nicht... 0 bedeutet nämlich laut MSDN &quot;The operation completed successfully&quot;, und das bringt mich keinen Deut weiter, denn was nützt mir die fehlerfreie Ausführung der Funktionen wenn das Ergebnis doch nicht stimmt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714503</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714503</guid><dc:creator><![CDATA[reclin]]></dc:creator><pubDate>Fri, 04 Feb 2005 12:37:49 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 12:49:58 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>kontrollier doch mal welche Styles Dein Listview hat. Vielleicht hat sich ja ein LVS_NOCOLUMNHEADER eingeschlichen ....</p>
<p>Gruss d_A</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714518</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714518</guid><dc:creator><![CDATA[der_anhalter]]></dc:creator><pubDate>Fri, 04 Feb 2005 12:49:58 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 13:05:01 GMT]]></title><description><![CDATA[<p>reclin schrieb:</p>
<blockquote>
<p>Ist es nicht... 0 bedeutet nämlich laut MSDN &quot;The operation completed successfully&quot;, und das bringt mich keinen Deut weiter, denn was nützt mir die fehlerfreie Ausführung der Funktionen wenn das Ergebnis doch nicht stimmt?</p>
</blockquote>
<p>doch denn jetzt weisst du das der fehler wohl nicht an dieser funktion liegt, sondern irgendwo anders (erstellen, etc) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> brauchbar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /><br />
setzte mal den report style gleich von anfang an und lass mal dein SetWindowLong()<br />
weg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714542</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714542</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 04 Feb 2005 13:05:01 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 13:32:38 GMT]]></title><description><![CDATA[<blockquote>
<p>setzte mal den report style gleich von anfang an und lass mal dein SetWindowLong()<br />
weg.</p>
</blockquote>
<p>Wie soll ich das machen? Die ListView ist in einer Dialogfeld-Ressource. Im Ressourceneditor von VC++6 gibt es AFAIK keine Einstellung für den report style bei der ListView...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714574</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714574</guid><dc:creator><![CDATA[reclin]]></dc:creator><pubDate>Fri, 04 Feb 2005 13:32:38 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 13:36:23 GMT]]></title><description><![CDATA[<p>dann direkt im *.rc<br />
[edit]<br />
doch geht<br />
eigenschaften--&gt;zweiter reiter--&gt;ansicht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714580</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714580</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 04 Feb 2005 13:36:23 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 14:43:05 GMT]]></title><description><![CDATA[<p>Hab da eigentlich schon geguckt, werd nochmal schauen wenn ich zu hause bin (bin grad auf arbeit...)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714641</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714641</guid><dc:creator><![CDATA[reclin]]></dc:creator><pubDate>Fri, 04 Feb 2005 14:43:05 GMT</pubDate></item><item><title><![CDATA[Reply to ListView leer on Fri, 04 Feb 2005 16:08:33 GMT]]></title><description><![CDATA[<p>Hehe, hab den fehler gefunden... Wie blöd kann man sein...<br />
In der Dialog-Ressource war keine ListView, sondern eine ListBox, daher habe ich die Einstellung für den Style natürlich nicht finden können...</p>
<p>Zur Erklärung: Die Ressource stammt von einem Kollegen, mit dem ich gemeinsam an dem Projekt bastele... Er ist noch nicht so fit in der Programmierung und hat sich daher bereit erklärt das ganze UI-Design zu übernehmen, da muss ihm wohl dieser Fehler unterlaufen sein... und ich habs nicht gemerkt...<br />
Eine Frage habe ich trotzdem noch: Wie kann das sein, dass ListWiev_InsertColumn(), auf eine ListBox angewendet, keinen Fehler verursacht? Sollte doch eigentlich nicht gehen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/714695</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/714695</guid><dc:creator><![CDATA[reclin]]></dc:creator><pubDate>Fri, 04 Feb 2005 16:08:33 GMT</pubDate></item></channel></rss>