Probleme mit SFT_Tree 4.0 beim einfügen eines Bitmaps

mki_germo

Erfahrenes Mitglied
Hallo!

Ich habe eine bestehende Anwendung die die Komponente SFT_Tree 4.0 verwendet.
In dieser werden bis jetzt nur Texte in der SFTTree-Komponente dargestellt. Nun soll in der ersten Spalte zusätzlich noch ein Icon dargestellt werden, allerdings übersehe ich wohl irgendetwas - es wird zwar der entsprechende Platz für das Icon reserviert, allerdings wird es nicht angezeigt.

Hier mal der relevante Source:

Table.cpp - leitet von CSftTree ab
Code:
	(...)

	HBITMAP hbm = NULL;
	CBitmap bmp;
	bmp.LoadBitmap(136);

	hbm = (HBITMAP)	bmp;
	SFTTREE_CELLINFOPARM cip; cip.version=4; cip.index=-1; cip.iCol=0;
	GetCellInfo(&cip);
	cip.Cell.hBmp = hbm;
	SetCellInfo(&cip);
	SetShowHeader(TRUE);   
	SetShowHeaderButtons(TRUE);



	// Define columns
	SFTTREE_COLUMN_EX aCol[] = {
		{ 0, 0,                        /* Reserved */
            w0,											/* Width (in pixels) */
            ES_LEFT | SFTTREE_TOOLTIP,   /* Cell alignment */
            ES_LEFT| SFTTREE_HEADER_UP,  /* Title style */
            _T("Formularname"),          /* Column header title */
            NULL, NULL,                  /* Reserved field and bitmap handle */
            SFTTREE_BMP_RIGHT },         /* Bitmap alignment */
	(...) //Definition der weiteren Spalten

	};
	SetColumns(7, aCol);								// Set column attributes

	SetShowHeader(TRUE);								// Show column headers
//	SetTreeLineStyle(SFTTREE_TREELINE_NONE);			// No tree lines
	SetShowButtons(FALSE);								// No expand/collapse buttons
	SetShowGrid(TRUE);									// Show grid
	SetShowTruncated(TRUE);								// Show ... if truncated
	SetNoFocusStyle(SFTTREE_NOFOCUS_FRAME);				// No focus, show frame
	SetSelectionStyle(SFTTREE_SELECTION_ALL);			// Select all cell
	SetFlyby(FALSE);									// no Flyby highlighting
	SetScrollTips(TRUE);								// Show Scrolltips
	SetInheritBgColor(TRUE);							// Inherit background color of first cell
	SetCrossColumnResize(TRUE);							// Resize multiple columns
	SetReorderColumns(TRUE);							// Column reordering
	SetOpenEnded(TRUE);									// Last column width
	SetShowHeaderButtons(TRUE);							// Show column header as buttons
    SetShowRowHeader(SFTTREE_ROWSTYLE_NONE);			// no Row style
    SetRowHeaderStyle(ES_CENTER | SFTTREE_HEADER_UP);	// Row header style
    SetShowRowColHeaderButton(FALSE);					// Row/column header as title
    SetRowColText("?");									// Row/column header text
    SetRowColHeaderStyle(ES_LEFT | SFTTREE_HEADER_UP);	// Row/column header style
    SetCharSearchMode(SFTTREE_CHARSEARCH_ALLCHARS, -1);	// Consider all characters typed


Die Darstellung erfolgt im folgenden Abschnitt:

Code:
m_Table.SetItemData(i, (DWORD)pgwi);				

			(...)
			//(DWORD)&(*(gwis.arr[iStatus][k])))
			
			HBITMAP hbm = NULL;
			CBitmap bmp;
			bmp.LoadBitmap(IDB_WARN);
			hbm = (HBITMAP)	bmp;
			SFTTREE_CELLINFOPARM cip; cip.version=4; cip.index=-1; cip.iCol=0;
			m_Table.GetCellInfo(&cip);
			cip.Cell.hBmp = hbm;
			m_Table.SetCellInfo(&cip);
			
			//m_Table.SetItemBitmap(i, bmp);
			m_Table.SetText(i, 1, pgwi->dokName);
			m_Table.SetText(i, 2, pgwi->beschreibung);
			m_Table.SetText(i, 3, pgwi->sachgebiet);
			m_Table.SetText(i, 4, pgwi->erstelltAm);
			m_Table.SetText(i, 5, pgwi->erstelltVon);
			m_Table.SetText(i, 6, pgwi->anzSaetze);
			(...)


Die Textinformationen werden auch weiterhin dargestellt, auch werden die einzelnen Zeilen von der Höhe her angepasst, allerdings werden keine Images dargestellt. (Siehe Anhang)

Bin ehrlich gesagt etwas ratlos :confused:


Vielen Dank schonmal im vorraus,
Manuel Kipke

Edit: Das Ganze ist eine MFC-Applikation
 

Anhänge

  • 26706attachment.jpg
    26706attachment.jpg
    34,8 KB · Aufrufe: 14
Zuletzt bearbeitet:
Zurück