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 und ein Icon in die Spalte

Empfohlene Antworten

Veröffentlicht

Hi, ich habe ein CLtistCrtl und möchte da ein Icon einbinden.

So habe ich es zur Zeit und es funktioniert auch.


	//Imagelist anlegen

	m_imagelist.Create(16,16,ILC_COLOR32,8,8);									//16*16 für kleine Symbole, ILC_COLOR für 32Bit Farbtiefe											

	m_hIcon[0] = AfxGetApp()->LoadIcon(IDI_KENNZEICHEN_ROT);

	m_hIcon[1] = AfxGetApp()->LoadIcon(IDI_KENNZEICHEN_BLAU);		


	m_imagelist.Add(m_hIcon[0]);												// Image hinzufügen

	m_imagelist.Add(m_hIcon[1]);												// Image hinzufügen

	m_ctrlList.SetImageList(&m_imagelist,LVSIL_SMALL);

	m_ctrlList.SetIcon(m_hIcon[0],LVSIL_SMALL);

Allerdings wird so ein Icon in allen Spalten angezeigt und auch am Anfang in der ersten Spalte.

Beispiel:

post-9679-14430447337269_thumb.jpg

Wie kann man jetzt das Icon in der letzten Spalte einbinden und dann auch nur einzeln?

Gruß

Filou

Hier wird ein Eintrag in die Liste hinzugefügt.

m_ctrlList.InsertItem(iZeile,"Eintrag", m_hIcon[1]);

Aber das icon wird so nicht geschluckt.

Der Compiler sagt:

int __thiscall CListCtrl::InsertItem(int,const char *,int)' : Konvertierung des Parameters 3 von 'struct HICON__' in 'int' nicht moeglich

hilfe :(

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.