Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CListCtrl/result - nur ein Icon in der 1. Col anzeigen?

Empfohlene Antworten

Veröffentlicht

Seid gegrüsst ...

...ich hätt da gerne mal wieder ein problem...

ich hab da eine CListCtrl/result in der ich in der ersten Spalte ein icon anzeige und dazu wird noch der erste wert (1 oder 0). das icon commt aus einem toolbar mit zwei

schaltflächen. daher die werte 1 oder null.

das ganze sieht so aus:

(col 1) (col 2) (col 2)

[icon0] 0 blabla blubb

soll aber so aussehen:

(col 1) (col 2) (col 2)

[icon0] blabla blubb

also der wert in der ersten spalte soll weg...

hat jemand eine idee???

ciao TinTin


void CListctrlDlg::InsertRow(CString csCsvData, int iCols)

{

	CString csCsvBuffer;


	if (csCsvData.Right(1)!=";")

		csCsvData+=";";


	int id = csCsvData.Find(';'), i = 1, iRow = LB_ERR;


	csCsvBuffer = csCsvData.Left(id);

	csCsvData = csCsvData.Mid(id + 1);


	int iIcon = atoi(csCsvBuffer);


	iRow = m_ctlList.InsertItem(m_ctlList.GetItemCount() +1, csCsvBuffer, iIcon);

	id = csCsvData.Find(';');


	while (id != -1 && i < iCols && iRow != LB_ERR)

	{	

		csCsvBuffer = csCsvData.Left(id);

		csCsvData = csCsvData.Mid(id + 1);

		m_ctlList.SetItemText(iRow, i, csCsvBuffer);

		i++;

		id = csCsvData.Find(';');

	}

	return;

}

so, dass ist die funktion die die liste füllt. 'csCsvData' beinhaltet eine zeile aus einer 'csv-datei', 'iCols' gibt die anzahl der felder an.

ich hoffe das wolltest du sehen.

ciao TinTin

das war wieder mal zu einfach...

danke für deine hilfe!!!

ciao TinTin

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.