<?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[Problem beim löschen markierter einträge vom listview]]></title><description><![CDATA[<p>Hey ich versteh das nicht warum wir nur jedes zweites Item gelöscht bei meiner Funktion?</p>
<pre><code class="language-cpp">int DelteItems(HWND hwnd,bool global)
{
    if (global==true)
    {
       SendMessage(hwnd, LVM_DELETEALLITEMS , (WPARAM)0, (LPARAM) (HTREEITEM)NULL);
       includeText(&quot;Alle Items wurden gelöscht&quot;);
    }
    else
    {
        for (long i = 0; i &lt;= ListView_GetItemCount(hwnd) ; i++)
        {
            if (ListView_GetItemState(hwnd,i,LVIS_SELECTED))
            {
                SendMessage(hwnd, LVM_DELETEITEM, (WPARAM)(int)i, 0);
            }
        }
        includeText(&quot;Martierte(s) Item(s) wurden erfolgreich gelöscht&quot;);
    }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/198066/problem-beim-löschen-markierter-einträge-vom-listview</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 12:02:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/198066.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Nov 2007 21:30:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem beim löschen markierter einträge vom listview on Sat, 17 Nov 2007 21:30:58 GMT]]></title><description><![CDATA[<p>Hey ich versteh das nicht warum wir nur jedes zweites Item gelöscht bei meiner Funktion?</p>
<pre><code class="language-cpp">int DelteItems(HWND hwnd,bool global)
{
    if (global==true)
    {
       SendMessage(hwnd, LVM_DELETEALLITEMS , (WPARAM)0, (LPARAM) (HTREEITEM)NULL);
       includeText(&quot;Alle Items wurden gelöscht&quot;);
    }
    else
    {
        for (long i = 0; i &lt;= ListView_GetItemCount(hwnd) ; i++)
        {
            if (ListView_GetItemState(hwnd,i,LVIS_SELECTED))
            {
                SendMessage(hwnd, LVM_DELETEITEM, (WPARAM)(int)i, 0);
            }
        }
        includeText(&quot;Martierte(s) Item(s) wurden erfolgreich gelöscht&quot;);
    }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1405095</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1405095</guid><dc:creator><![CDATA[listview]]></dc:creator><pubDate>Sat, 17 Nov 2007 21:30:58 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim löschen markierter einträge vom listview on Sun, 18 Nov 2007 00:30:56 GMT]]></title><description><![CDATA[<p>Ich schätze mal, wenn ein Item gelöscht wird, rücken die anderen auf. Demnach solltest du &quot;i&quot; nicht inkrementieren, wenn ein Item gelöscht wird bzw. einfach ein &quot;i--;&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1405129</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1405129</guid><dc:creator><![CDATA[crackseller]]></dc:creator><pubDate>Sun, 18 Nov 2007 00:30:56 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim löschen markierter einträge vom listview on Sun, 18 Nov 2007 01:04:36 GMT]]></title><description><![CDATA[<p>Du hattest Recht so ein blöder Fehler ich hab es nun so gelöst:</p>
<pre><code class="language-cpp">int DelteItems(HWND hwnd,bool global)
{
    if (global==true)
    {
       SendMessage(hwnd, LVM_DELETEALLITEMS , (WPARAM)0, (LPARAM) (HTREEITEM)NULL);
       includeText(&quot;Alle Items wurden entfernt&quot;);
    }
    else
    {
        for (int i=ListView_GetItemCount(hwnd);i&gt;=0 ; i--)
        {
            if (ListView_GetItemState(hwnd,i,LVIS_SELECTED))
            {
                SendMessage(hwnd, LVM_DELETEITEM, (WPARAM)i, (LPARAM) (HTREEITEM)NULL);
            }
        }
        includeText(&quot;Martierte(s) Item(s) wurden erfolgreich entfernt&quot;);
    }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1405134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1405134</guid><dc:creator><![CDATA[listview]]></dc:creator><pubDate>Sun, 18 Nov 2007 01:04:36 GMT</pubDate></item><item><title><![CDATA[Reply to Problem beim löschen markierter einträge vom listview on Sun, 18 Nov 2007 15:15:59 GMT]]></title><description><![CDATA[<p>Eine andere Möglichkeit ist es ListView_GetNextItem zu verwendne</p>
<pre><code class="language-cpp">int i = 0;
while ((i=ListView_GetNextItem(hwnd,i-1,LVIS_SELECTED))!=1)
    ListView_DeleteItem(hwnd, i);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1405361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1405361</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sun, 18 Nov 2007 15:15:59 GMT</pubDate></item></channel></rss>