<?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[CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved)]]></title><description><![CDATA[<p>Hi,</p>
<p>ich versuche bei einer Liste in den Spaltenüberschriften die Sortierpfeile (aufsteigend/absteigend) zu implementieren, aber ich finde leider kein Ansatz. Suche blieb auch erfolglos.</p>
<p>Es wäre nett, wenn mich jemand in die richtige Richtung schubsen könnte.</p>
<p>Vielen Dank im voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/44248/clistctrl-gt-sortierpfeile-wie-beim-explorer-solved</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Apr 2026 10:51:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/44248.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 29 Jul 2003 12:48:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Thu, 31 Jul 2003 08:47:44 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich versuche bei einer Liste in den Spaltenüberschriften die Sortierpfeile (aufsteigend/absteigend) zu implementieren, aber ich finde leider kein Ansatz. Suche blieb auch erfolglos.</p>
<p>Es wäre nett, wenn mich jemand in die richtige Richtung schubsen könnte.</p>
<p>Vielen Dank im voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/320300</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/320300</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Thu, 31 Jul 2003 08:47:44 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 06:37:36 GMT]]></title><description><![CDATA[<p>Hallo.<br />
Also wenn du sagst: Suche blieb erfolglos, dann glube ich nicht das du ernsthaft gesucht hast bzw. du kennst codeguru noch nicht.</p>
<p><a href="http://www.codeguru.com/listview/image_in_header.shtml" rel="nofollow">http://www.codeguru.com/listview/image_in_header.shtml</a><br />
zum Darstellen von Bitmaps im Header</p>
<p><a href="http://www.codeguru.com/listview/FloresSort.shtml" rel="nofollow">http://www.codeguru.com/listview/FloresSort.shtml</a><br />
sortieralgo</p>
<p>vieeeeele weiter artikel unter <a href="http://www.codeguru.com" rel="nofollow">http://www.codeguru.com</a><br />
dort findet man fast für alles eine antwort</p>
]]></description><link>https://www.c-plusplus.net/forum/post/320740</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/320740</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Wed, 30 Jul 2003 06:37:36 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 08:08:43 GMT]]></title><description><![CDATA[<p>*schmunzelt*</p>
<p>Die Site kenne ich schon, doch dort blieb meine Suche erfolglos und wenn ich mir den Titel angucke wundert es mich auch weniger.</p>
<p>Ich habe gestern abend auch noch etwas gefunden, was aber leider nicht so gut klappt, da ich die Schriftart angepaßt habe in meiner Liste und die wieder geändert wird.</p>
<p>Hier mal dern Link für Interessierte:<br />
<a href="http://www.wildcomputer.com/h2mfcdclistviewheaders.htm" rel="nofollow">http://www.wildcomputer.com/h2mfcdclistviewheaders.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/320792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/320792</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Wed, 30 Jul 2003 08:08:43 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 08:13:40 GMT]]></title><description><![CDATA[<p>*geliebtes Doppelpost*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/320802</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/320802</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Wed, 30 Jul 2003 08:13:40 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 11:33:00 GMT]]></title><description><![CDATA[<p>So ich habe mir das mal angesehen und versucht und getan:</p>
<p>Fazit:<br />
2 Methoden, die eher weniger laufen.</p>
<p>Bei der hier zeigt er nix mehr an......Das Bitmap wird nicht geladen:</p>
<pre><code class="language-cpp">void CBilView::setListCtrlHeaderBitmap( CListCtrl* pList, int iColumn, BOOL bUpDown )
{
	CBitmap MyBitmap;

	MyBitmap.LoadBitmap(IDB_BITMAP_ARR_UP);

	CHeaderCtrl* pListHeader = pList-&gt;GetHeaderCtrl();

	HD_ITEM hditem;
	hditem.mask = HDI_FORMAT;
	BOOL bRes = pListHeader-&gt;GetItem( iColumn, &amp;hditem );
	hditem.mask = HDI_BITMAP | HDI_FORMAT;
	hditem.fmt |= HDF_BITMAP;
	hditem.hbm = (HBITMAP)MyBitmap.GetSafeHandle();
	bRes = pListHeader-&gt;SetItem( iColumn, &amp;hditem );
	return;
}
</code></pre>
<p>Bei der hier ist alles ganz nett und funktioniert auch, <strong>aber</strong> ich kann leider nicht wieder die eigentliche Font herstellen in der Spaltenüberschrift.</p>
<pre><code class="language-cpp">void CBilView::ListViewSetArrow( CListCtrl * pList, int nColumn, BOOL bReverse )
{
    ASSERT_VALID(pList) ;

    //
    // Find header
    //
    CWnd * pChild = pList-&gt;GetWindow( GW_CHILD ) ;
    if ( pChild == NULL ) return ;
    ASSERT_VALID(pChild) ;

    char ss[256] ;
    GetClassName( pChild-&gt;m_hWnd, ss, sizeof ss ) ;
    if ( 0 != _stricmp( ss, &quot;SysHeader32&quot; ) )
    {
        return ;
    }

    //
    // Get width and height of selected item
    //
    HD_ITEM hdi ;
    memset( &amp;hdi, 0, sizeof hdi ) ;
    hdi.mask = HDI_WIDTH ;
    pChild-&gt;SendMessage( HDM_GETITEM, nColumn, (LPARAM)&amp;hdi );

    int ww = hdi.cxy ;
    CRect rectClient ;
    ::GetClientRect( pChild-&gt;m_hWnd, &amp;rectClient ) ;
    int hh = rectClient.Height() ;
    ASSERT( ww &gt; 0 ) ;
    ASSERT( hh &gt; 0 ) ;

    //
    // Get Text
    //
    char szText[256] ;
    memset( &amp;hdi, 0, sizeof hdi ) ;
    hdi.mask = HDI_TEXT ;
    hdi.pszText = szText ;
    hdi.cchTextMax = sizeof szText ;
    pChild-&gt;SendMessage( HDM_GETITEM, nColumn, (LPARAM)&amp;hdi );

    //
    // Create bitmap
    //
    HDC hdcHeader = ::GetDC( pChild-&gt;m_hWnd ) ;
    HBITMAP hbitmap = CreateCompatibleBitmap( hdcHeader, ww, hh ) ;
    HDC hbitmapDC = CreateCompatibleDC( hdcHeader ) ;
    SelectObject( hbitmapDC, hbitmap ) ;

    HBRUSH hBrush = GetSysColorBrush( COLOR_BTNFACE ) ;
    HBRUSH hOldBrush = (HBRUSH)SelectObject( hbitmapDC, hBrush ) ;
    //HFONT hOldFont = (HFONT)SelectObject( hbitmapDC, GetStockObject(DEFAULT_GUI_FONT) ) ;
	HFONT hOldFont = (HFONT)SelectObject( hbitmapDC, GetStockObject(DEFAULT_PALETTE) ) ;
	//HFONT hOldFont = (HFONT)(CFont)::SelectObject(&amp;m_MyFont);

    CRect rectBack(0,0,ww,hh) ;
    FillRect( hbitmapDC, &amp;rectBack, hBrush ) ;

    if ( ww &gt; 32 )
    {
        CRect rectText(0,0,ww-32,hh) ;
        SetBkMode( hbitmapDC, TRANSPARENT ) ;
        DrawTextEx( hbitmapDC, szText, -1, rectText, DT_LEFT | DT_TOP | DT_SINGLELINE | DT_NOPREFIX | DT_END_ELLIPSIS, NULL ) ;
    }

    HPEN hWhitePen = (HPEN)GetStockObject( WHITE_PEN ) ;
    HPEN hBlackPen = (HPEN)GetStockObject( BLACK_PEN ) ;
    HPEN hOldPen = (HPEN)SelectObject( hbitmapDC, hWhitePen ) ;
    if ( bReverse )
    {
        MoveToEx( hbitmapDC, ww-24, 4, NULL ) ;
        LineTo( hbitmapDC, ww-28, 12 ) ;
        SelectObject( hbitmapDC, hBlackPen ) ;
        LineTo( hbitmapDC, ww-20, 12 ) ;
        LineTo( hbitmapDC, ww-24, 4 ) ;
    } else
    {
        MoveToEx( hbitmapDC, ww-20, 4, NULL ) ;
        LineTo( hbitmapDC, ww-28, 4 ) ;
        LineTo( hbitmapDC, ww-24, 12 ) ;
        SelectObject( hbitmapDC, hBlackPen ) ;
        LineTo( hbitmapDC, ww-20, 4 ) ;
    }
    SelectObject( hbitmapDC, hOldPen ) ;
    SelectObject( hbitmapDC, hOldFont ) ;
    SelectObject( hbitmapDC, hOldBrush ) ;
    DeleteDC( hbitmapDC ) ;
    ::ReleaseDC( pChild-&gt;m_hWnd, hdcHeader ) ;

    //
    // set header of selected item
    //
    memset( &amp;hdi, 0, sizeof hdi ) ;
    hdi.mask = HDI_BITMAP | HDI_FORMAT ;
    hdi.fmt = HDF_LEFT | HDF_BITMAP ;
    hdi.hbm = hbitmap ;
    pChild-&gt;SendMessage( HDM_SETITEM, nColumn, (LPARAM)&amp;hdi ) ;

    //
    // reset all others
    //
    int nCount = (int)pChild-&gt;SendMessage( HDM_GETITEMCOUNT, 0, 0L);
    if ( nCount &gt; 0 )
    {
        for ( int ii = 0 ; ii &lt; nCount ; ii++ )
        {
            if (nColumn != ii )
            {
                HD_ITEM hdi2 ;
                memset( &amp;hdi2, 0, sizeof hdi2 ) ;
                hdi2.mask = HDI_FORMAT ;
                hdi2.fmt = HDF_LEFT | HDF_STRING ;
                pChild-&gt;SendMessage( HDM_SETITEM, ii, (LPARAM)&amp;hdi2 ) ;
            }
        } // for
    } // if
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/320941</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/320941</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Wed, 30 Jul 2003 11:33:00 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 12:05:42 GMT]]></title><description><![CDATA[<p>bei mir geht Möglichkeit 1 auch nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/320966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/320966</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Wed, 30 Jul 2003 12:05:42 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 12:11:31 GMT]]></title><description><![CDATA[<p>hehehe..</p>
<p>y00...das war der Versuch den ich startete unter Zuhilfename des Links von Codeguru von Dir. Waren wohl auch einige Fehlerchen drin dort...</p>
<p>Irgendwelche Vorschläge? ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/320973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/320973</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Wed, 30 Jul 2003 12:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 12:20:51 GMT]]></title><description><![CDATA[<p>Ich habe bei codeguru ein Bsp Projekt runtergeladen, bei dem alles gefunzt hat. Ist aber ziemlich komplex.</p>
<p>Ich glaube, dass das Problem bei den Flags liegt.</p>
<p>Deine 2. möglichkeit ist mir auf jeden Fall zu lange.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/320982</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/320982</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Wed, 30 Jul 2003 12:20:51 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 15:49:58 GMT]]></title><description><![CDATA[<p>yopyop</p>
<p>habe die codeguru version nochmal überarbeitet und nun auch zum laufen bekommen. fehlt nur noch, daß die überschriften nicht korrekt ausgelesen werden(zeigerproblem) und das die graphik links ist. daran werde ich mich morgen machen, obwohl mir die graphik links gut gefällt.</p>
<p>poste dann morgen mal das ergebnis</p>
]]></description><link>https://www.c-plusplus.net/forum/post/321128</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/321128</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Wed, 30 Jul 2003 15:49:58 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Wed, 30 Jul 2003 19:00:10 GMT]]></title><description><![CDATA[<p>Ja bitte das wäre nett <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>
]]></description><link>https://www.c-plusplus.net/forum/post/321271</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/321271</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Wed, 30 Jul 2003 19:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Thu, 31 Jul 2003 08:45:04 GMT]]></title><description><![CDATA[<p>So wie angedroht kommt nun meine Methode:</p>
<pre><code class="language-cpp">void CBilView::setListCtrlHeaderBitmap( CListCtrl* pList, int iColumn, BOOL bUpDown )
{
	HINSTANCE hInst = AfxGetInstanceHandle();
	HBITMAP hBitmap = NULL;
	HD_ITEM hditem;

	CString strText = &quot;&quot;;

	CWnd * pChild = pList-&gt;GetWindow( GW_CHILD ) ;
    if( pChild == NULL )
	{
		return ;
	}
    ASSERT_VALID(pChild) ;

	// Bitmap laden
	if( bUpDown == TRUE )
	{
		hBitmap = ::LoadBitmap(hInst,MAKEINTRESOURCE(IDB_BITMAP_ARR_UP));
	}
	else
	{
		hBitmap = ::LoadBitmap(hInst,MAKEINTRESOURCE(IDB_BITMAP_ARR_DOWN));
	}

	// HeaderCtrl auf ListCtrl holen
	CHeaderCtrl* pListHeader = pList-&gt;GetHeaderCtrl();

	// Spaltenüberschrift auslesen
    char szText[256] ;
    memset( &amp;hditem, 0, sizeof hditem ) ;
    hditem.mask = HDI_TEXT ;
    hditem.pszText = szText ;
    hditem.cchTextMax = sizeof szText ;
    pChild-&gt;SendMessage( HDM_GETITEM, iColumn, (LPARAM)&amp;hditem );
	strText = szText;

	// Spaltenüberschrift und Bitmap setzen
	hditem.mask = HDI_FORMAT;
	BOOL bRes = pListHeader-&gt;GetItem( iColumn, &amp;hditem );
	hditem.mask = HDI_TEXT | HDI_FORMAT | HDI_BITMAP;
	hditem.fmt |= HDF_BITMAP;
	hditem.hbm = hBitmap;
	hditem.pszText = strText.GetBuffer(strText.GetLength());
	hditem.cchTextMax = strText.GetLength();
	bRes = pListHeader-&gt;SetItem( iColumn, &amp;hditem );

	// Reset der übrigen Spalten
	int iCount = pListHeader-&gt;GetItemCount();

	for( int i=0; i&lt;iCount; i++ )
	{
		if( i != iColumn )
		{
			// Spaltenüberschrift auslesen
			szText[256] ;
			memset( &amp;hditem, 0, sizeof hditem ) ;
			hditem.mask = HDI_TEXT ;
			hditem.pszText = szText ;
			hditem.cchTextMax = sizeof szText ;
			pChild-&gt;SendMessage( HDM_GETITEM, i, (LPARAM)&amp;hditem );
			strText = szText;

			// Spaltenüberschrift setzen
			hditem.mask = HDI_FORMAT;
			bRes = pListHeader-&gt;GetItem( i, &amp;hditem );
			hditem.mask = HDI_FORMAT;
			hditem.fmt &amp;= ~HDF_BITMAP;
			hditem.pszText = strText.GetBuffer(strText.GetLength());
			hditem.cchTextMax = strText.GetLength();
			bRes = pListHeader-&gt;SetItem( i, &amp;hditem );
		}
	}

	return;
}
</code></pre>
<p>Einfach 2 Bitmaps erstellen und die dann in der Methode laden. Könnte man sicherlich noch als Param übergeben oder sowas.</p>
<p>Ein Problem, daß ich noch habe ist bei Auslesen der Spaltenüberschriften:<br />
Ich kriege es nicht anders als mit der SendMessage hin...</p>
<p>Sollte das nicht auch mit CHeaderCtrl::GetItem direkt gehen?</p>
<p>Naja......soweit funzt es erstmal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/321617</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/321617</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Thu, 31 Jul 2003 08:45:04 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Fri, 01 Aug 2003 07:28:50 GMT]]></title><description><![CDATA[<p>Ja das funzt ja wirklich!</p>
<p>Das mit SendMessage kannst du auch mit GetItem machen. Selber effekt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/322329</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/322329</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Fri, 01 Aug 2003 07:28:50 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Fri, 01 Aug 2003 08:10:40 GMT]]></title><description><![CDATA[<p>Jover schrieb:</p>
<blockquote>
<p>Ja das funzt ja wirklich!</p>
<p>Das mit SendMessage kannst du auch mit GetItem machen. Selber effekt.</p>
</blockquote>
<p>Schon versucht....Mit GetItem() wollte er immer nicht...</p>
<p>kA warum</p>
<p>[edit]<br />
anstatt des bool als 3. parameter bietet es sich sicherlich für allgemeine lösungen an, nen HBITMAP zu übergeben.<br />
[/edit]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/322350</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/322350</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Fri, 01 Aug 2003 08:10:40 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Fri, 01 Aug 2003 08:29:47 GMT]]></title><description><![CDATA[<p>Bei mir gehts schon mit GetItem</p>
]]></description><link>https://www.c-plusplus.net/forum/post/322362</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/322362</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Fri, 01 Aug 2003 08:29:47 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Fri, 01 Aug 2003 09:09:49 GMT]]></title><description><![CDATA[<p>Jover schrieb:</p>
<blockquote>
<p>Bei mir gehts schon mit GetItem</p>
</blockquote>
<p>humm...</p>
<p>magst mal posten?</p>
<p>ich glaube bald meine entwicklungsumgebung spinnt ein bissel....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/322397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/322397</guid><dc:creator><![CDATA[Frenzy]]></dc:creator><pubDate>Fri, 01 Aug 2003 09:09:49 GMT</pubDate></item><item><title><![CDATA[Reply to CListCtrl =&amp;gt; Sortierpfeile wie beim Explorer (solved) on Fri, 01 Aug 2003 13:59:26 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">void CMyView::SetBitmapItem(int nCol, int nPriority, CListCtrl* pList)
{
		ASSERT((nPriority == 1) || (nPriority) == 2
|| (nPriority == 3));

		HINSTANCE hInst = AfxGetInstanceHandle(); 
		HBITMAP hBitmap = NULL; 
		HD_ITEM hditem; 

		CString strText = &quot;&quot;; 

		CWnd * pChild = pList-&gt;GetWindow( GW_CHILD ) ; 
		if( pChild == NULL ) 
		{ 
			return ; 
		} 
		ASSERT_VALID(pChild) ;

		switch(nPriority)
		{
		case 1:
			hBitmap = ::LoadBitmap(hInst,MAKEINTRESOURCE(IDB_1)); 
			break;
		case 2:
			hBitmap = ::LoadBitmap(hInst,MAKEINTRESOURCE(IDB_2)); 
			break;
		case 3:
			hBitmap = ::LoadBitmap(hInst,MAKEINTRESOURCE(IDB_3)); 
			break;
		default:
			ASSERT(FALSE);
			break;
		}

		CHeaderCtrl* pListHeader = pList-&gt;GetHeaderCtrl();

		char szText[256];
		memset(&amp;hditem, 0, sizeof(hditem));
		hditem.mask = HDI_TEXT;
		hditem.pszText = szText;
		hditem.cchTextMax = sizeof(szText);
		//pChild-&gt;SendMessage(HDM_GETITEM, nCol, (WPARAM)&amp;hditem);
		pListHeader-&gt;GetItem(nCol, &amp;hditem);
		strText = szText;

		hditem.mask = HDI_FORMAT;
		BOOL bRes = pListHeader-&gt;GetItem(nCol, &amp;hditem);
		hditem.mask = HDI_TEXT | HDI_FORMAT | HDI_BITMAP;
		hditem.fmt |= HDF_BITMAP;
		hditem.hbm = hBitmap;
		hditem.pszText = strText.GetBuffer(strText.GetLength());
		hditem.cchTextMax = strText.GetLength();
		bRes = pListHeader-&gt;SetItem(nCol, &amp;hditem);
}
</code></pre>
<p>Bei mir its ein bisschen anders.<br />
Es wird aus 3 Bitmaps ausgewählt und das entfernen der Bitmaps habe ich in ne eigene Funktion gepackt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/322638</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/322638</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Fri, 01 Aug 2003 13:59:26 GMT</pubDate></item></channel></rss>