Comment recuperer les msg d'une CListCtrl cree dynamiquement?
Hello,
j'ai un dialog en vc++ qui comprend un CListCtrl, je recupere les actions (click, click droit,etc) de cette liste grace à ON_NOTIFY(NM_CLICK, IDC_LIST2, <NomDeRoutine>) dans //{{AFX_MSG_MAP(CTestListe).
Jusque la, ça va bien.
Maintenant, j'ai un dialog vide et je construis dynamiquement la CListCtrl avec:
Code:
1 2
| m_Liste = new CListCtrl;
VERIFY (m_Liste->Create (WS_VISIBLE | WS_CHILD | LVS_REPORT | LVS_EDITLABELS, CRect (10, 10, 300, 300), this, IDI_LIST)); |
Si je fais un ON_NOTIFY(NM_CLICK, IDI_LIST, <NomDeRoutine>) j'ai 2 erreurs de compil au niveau de la ligne ON_NOTIFY :
Citation:
- error C2065: '<NomDeRoutine>' : undeclared identifier
- error C2440: 'type cast' : cannot convert from 'int *' to 'void (__thiscall CCmdTarget::*)(struct tagNMHDR *,long *)'
Comment je fais pour recuperer les actions et associer la bonne routine en fonction du type de message??
D'avance merci
DD