Gestion de deux sliders...

PepeDeLuxe Messages postés 14 Date d'inscription samedi 22 mai 2004 Statut Membre Dernière intervention 29 avril 2005 - 24 mai 2004 à 20:55
PepeDeLuxe Messages postés 14 Date d'inscription samedi 22 mai 2004 Statut Membre Dernière intervention 29 avril 2005 - 24 mai 2004 à 23:18
J'ai presque finis mon application que je rajoute une slidebar et une question essentielle me vient ... comment différencier l'événement WM_HSCROLL des deux slides ??
En faisant LOWORD(wParam)==IDC_SLIDER1 ca ne marche pas ...
Merci pour l'aide....

case WM_HSCROLL:
{
if/*((LOWORD(wParam)==IDC_SLIDER1) && */((LOWORD(wParam)==SB_THUMBTRACK)||(LOWORD(wParam)==SB_PAGEUP)||(LOWORD(wParam)==SB_PAGEDOWN))
{
datedebut=var1;
datefin=var2;

position = SendMessage(GetDlgItem(Dlg,IDC_SLIDER1), TBM_GETPOS, 0, 0);

datedebut=datedebut+((atoi(stru.tempsacqui)*60)*position);

//datefin=datefin+(atoi(stru.tempsacqui)*60);
TraitementDate();

SetWindowText(GetDlgItem(Dlg, IDC_EDIT1), chdatedebut);
//SetWindowText(GetDlgItem(Dlg, IDC_EDIT2), chdatefin);
}
}

2 réponses

ymca2003 Messages postés 2070 Date d'inscription mardi 22 avril 2003 Statut Membre Dernière intervention 3 juillet 2006 7
24 mai 2004 à 23:08
lParam doit contenir le handle du contrôle, en faisant un GetDlgCtrlId() dessus du drvrais avoir l'id du TrackBar
0
PepeDeLuxe Messages postés 14 Date d'inscription samedi 22 mai 2004 Statut Membre Dernière intervention 29 avril 2005
24 mai 2004 à 23:18
Ok j'ai trouvé
MERCI BIEN....
0
Rejoignez-nous