Pour des choses aussi simples, on regarde MSDN et on a la réponse illico.
count = SendMessage(hlb, LB_GETCOUNT, 0, 0);
if(count <= 0) return;
n = SendMessage(hlb, LB_GETSELCOUNT, 0, 0);
if(n <= 0) return;
while(--count >= 0) {
idx = SendMessage(hlb, LB_GETSEL, count, 0);
if(idx > 0) {
// SELECT ALORS A TRAITER
if(--n == 0) break; // BASTA, Y EN A PLUS
}
}
ciao...
BruNews, MVP VC++
|