Salut tous !
Voilà mon probleme; j'ai fait mon application avec six routeurs qui doivent s'echanger les données(les trames quoi).Pour un premier j'avais utiliser "SetTimer()" pour faire bouger les trames.Il se trouve que maintenant il me pose un norme probleme Chaque routeur fait son tour mais arriver au sixieme routeur il marche plus!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
  Voilà le code que j'ai utilisé avec setTimer
   case WM_TIMER:
		{
 
			RECT rcClient;
			HDC hdc = GetDC(hwnd);
 
			GetClientRect(hwnd, &rcClient);
 
			if(tour==0){
                                                                 tour_R1(rcClient);
				R1_trame(hdc, &rcClient);
 
			}
			if(tour==1){
				tour_R6(rcClient);
				R6_trame(hdc, &rcClient);
			}
	    	if(tour==2){
				tour_R4(rcClient);
				R4_trame(hdc, &rcClient);
			} 
			if(tour==3){
				tour_R2(rcClient);
				R2_trame(hdc, &rcClient);
			}
			if(tour==4){
				tour_R5(rcClient);
				R5_trame(hdc, &rcClient);
			}  
			if(tour==5){
				tour_R3(rcClient);
				R3_trame(hdc, &rcClient);
			}    
			ReleaseDC(hwnd, hdc);
 
		}
		break;
Les fonctions tour_Ri() mettent à jour la variable "tour pour le routeur suivant"
Merci pour votre aide