Salut !
Je ne sais pas comment manipuler l'�vennement changement de s�lection sur un CListCtrl : Sauriez vous le faire ?
Merci
Version imprimable
Salut !
Je ne sais pas comment manipuler l'�vennement changement de s�lection sur un CListCtrl : Sauriez vous le faire ?
Merci
salut,
�a te va ?Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 BEGIN_MESSAGE_MAP(CTestMDIView, CFormView) //{{AFX_MSG_MAP(CTestMDIView) ON_NOTIFY(NM_CLICK, IDC_LISTCTRL, OnClickListctrl) ON_NOTIFY(HDN_TRACK, IDC_LISTCTRL, OnTrackListctrl) ON_NOTIFY(LVN_BEGINDRAG, IDC_LISTCTRL, OnBegindragListctrl) ON_NOTIFY(HDN_BEGINTRACK, IDC_LISTCTRL, OnBegintrackListctrl) ON_NOTIFY(LVN_ITEMCHANGED, IDC_LISTCTRL, OnItemchangedListctrl) //}}AFX_MSG_MAP END_MESSAGE_MAP() void CTestMDIView::OnItemchangedListctrl(NMHDR* pNMHDR, LRESULT* pResult) { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; // TODO: Add your control notification handler code here if( pNMListView->uNewState & LVIS_SELECTED ) { // traitement. } *pResult = 0; }
:D
Merci, mais ce qui ne me convient pas, c'est que l'�vennement est soulev� plusieurs fois quand tu changes de s�lection (avec les fl�ches du clavier, par exemple..).
Si tu connais mieux, je suis preneur, mais sinon, c'est pas grave.
Je consid�re le probl�me r�solu.