| 12
 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
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 
 |  
#include <conio.h> 
#include <stdio.h> 
#include <stdlib.h> 
#include <windows.h> 
 
 
 
void gotoxy(int x,int y){ 
   COORD p; 
   p.X=x; 
   p.Y=y; 
   SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),p); 
} 
 
 
int curseur(int colonne,int ligne_min,int ligne_max,int ecart_entre_les_lignes){ 
     int ligne=ligne_min; 
     int entree; 
     do{ 
        gotoxy(colonne,ligne); 
        printf(">"); 
        entree=getch(); 
 
 
        if((entree==50) && (ligne!=ligne_max)){ 
                                                printf("\b "); 
                                                ligne=ligne+ecart_entre_les_lignes; 
                                                } 
 
        if((entree==56) && (ligne!=ligne_min)){ 
                                                printf("\b "); 
                                                ligne=ligne-ecart_entre_les_lignes; 
                                                } 
 
        if(entree==13)
		{affichage();/*le lien*/ } 
 
        }while(1); 
 
        return ligne; 
} 
 int main (void)
 
{ 
void affichage();/* je veux mettre un lien entre cette page avec une autre page */
 
gotoxy(33,13);printf("Sommaire"); 
gotoxy(33,20);printf("1 - Ajouter un livre"); 
gotoxy(33,22);printf("2 - Ajouter emprunt de livre"); 
gotoxy(33,24);printf("3 - Supprimer un emprunt"); 
gotoxy(33,26);printf("4 - Afficher les livres"); 
gotoxy(33,28);printf("5 - Quitter"); 
 
 
curseur(32,20,28,2); 
 
gotoxy(15,40); 
 
} | 
Partager