Magnipulation d'un Progressbar

ngatcha Messages postés 10 Date d'inscription mardi 13 janvier 2004 Statut Membre Dernière intervention 18 mars 2004 - 2 mars 2004 à 15:19
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019 - 2 mars 2004 à 15:42
corinne petguet
Quelle erreur y'a t-il dans ce programme?

/*GetDlgItem(hdlg, IDC_PROGRESS);
hProgress = CreateWindowEx(0, PROGRESS_CLASS, (LPSTR) NULL, WS_CHILD | WS_VISIBLE, 10, 10, 200, 20, hWnd, (HMENU) 0, hInstance, NULL);

GetDlgItem(hdlg, IDC_PROGRESS);

int i, end_progress;

SendMessage(hProgress, PBM_SETRANGE, 0, MAKELPARAM (0, 100));
SendMessage(hProgress, PBM_SETSTEP, (WPARAM) 1, 0);

while(end_progress != 1)
{
i++;
SendMessage(hProgress, PBM_SETPOS, (WPARAM) i, 0);
if (i >100) { i 0; }

Sleep(100L);
}
Merci d'avance

1 réponse

BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
2 mars 2004 à 15:42
while(end_progress != 1)
sera boucle eternelle ou jamais executee car je ne vois ni incr ni decr dans le while.
GetDlgItem(hdlg, IDC_PROGRESS); sert a quoi ???

C'est pour un concours de copier-coller tout cela ???

ciao...
BruNews, Admin CS, MVP Visual C++
0
Rejoignez-nous