voila le code complet
#include <stdio.h>
#include <stdlib.h>
#include <myconio.h>
#include <windows.h>
void hide_cursor()
{
CONSOLE_CURSOR_INFO cursor = {1, FALSE};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor);
}
void show_cursor()
{
CONSOLE_CURSOR_INFO cursor = {1, TRUE};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor);
}
void trace_interface()
{
int i;
gotoxy(1,1);
printf("%c",201);
for(i=1;i<=120-2;i++)
{
printf("%c",205);
}
printf("%c",187);
for(i=2;i<=48;i++)
{
gotoxy(1,i);
printf("%c",186);
gotoxy(120,i);
printf("%c",186);
}
printf("%c",200);
for(i=1;i<=120-2;i++)
{
printf("%c",205);
}
printf("%c",188);
gotoxy(1,3);
printf("%c",204);
for(i=1;i<=120-2;i++)
{
printf("%c",205);
}
printf("%c",185);
gotoxy(35,2);
printf("Application Artisanale De Gestion Comerciale V1.0");
}
int show_menu(char menu[10][255])
{
int i,min=0,max=0;
hide_cursor();
trace_interface();
int btn;
for(i=1;i<=10;i++)
{
if((int)menu[i][0]!=0)
{
max++;
gotoxy(30,i*2+15);
printf("%s \n",menu[i]);
}
}
int choix=1;
while (btn != 13)
{
btn= getch ();
}
show_cursor();
}
void main()
{
int hauteur,largeur;
system("cls");
system("mode con LINES=50 COLS=120");
system("Color 17");
int operation;
char menu[6][255];
strcpy(menu[1],"MENU 1");
strcpy(menu[2],"MENU 2");
strcpy(menu[3],"MENU 3");
strcpy(menu[4],"MENU 4");
strcpy(menu[5],"MENU 5");
strcpy(menu[6],"MENU 6");
show_menu(menu);
// system("cls");
printf("==>%d",operation);
}