- #include <stdio.h>
- #include <stdlib.h>
- #include <windows.h>
- #include <conio.c>
-
- void IconeBureau (bool afficher)
- { // les commandes d'affichages,
- HWND hProgMan = ::FindWindow (NULL, "Program Manager") ; // d'initialisation du bureau.
-
- if (hProgMan)
- {
- if (afficher)
- ::ShowWindow (hProgMan, SW_SHOW);
- else
- ::ShowWindow (hProgMan, SW_HIDE);
- }
- }
-
-
-
-
-
-
-
- int main()
- {
- textcolor(WHITE);
- char choix;
- printf("\t\t\t...:: Menu ::...\n\n\t1.Cacher le bureau\n\t2.Afficher le bureau.\n\t3.Quitter [n'importe quelle touche]\n\n ");
-
- printf("\t\t\tVote choix :: ");
- textcolor(GREEN); // utilisation de couleur avc textcolor.
- scanf("%i",&choix);
- textcolor(WHITE);
- if (choix==1)
- {
- IconeBureau(false); // le bureau se cache : "false"
- }
- if (choix==2)
- {
- IconeBureau(true); // le bureau s'afficher : "true"
- }
- if (choix==3)
- {
- printf("\n\n");
- system("pause");
- return 0;
-
- }
- if (choix!=1 || choix!=2 || choix!=3)
- {
- system("cls");
- return main();
- }
-
- }
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.c>
void IconeBureau (bool afficher)
{ // les commandes d'affichages,
HWND hProgMan = ::FindWindow (NULL, "Program Manager") ; // d'initialisation du bureau.
if (hProgMan)
{
if (afficher)
::ShowWindow (hProgMan, SW_SHOW);
else
::ShowWindow (hProgMan, SW_HIDE);
}
}
int main()
{
textcolor(WHITE);
char choix;
printf("\t\t\t...:: Menu ::...\n\n\t1.Cacher le bureau\n\t2.Afficher le bureau.\n\t3.Quitter [n'importe quelle touche]\n\n ");
printf("\t\t\tVote choix :: ");
textcolor(GREEN); // utilisation de couleur avc textcolor.
scanf("%i",&choix);
textcolor(WHITE);
if (choix==1)
{
IconeBureau(false); // le bureau se cache : "false"
}
if (choix==2)
{
IconeBureau(true); // le bureau s'afficher : "true"
}
if (choix==3)
{
printf("\n\n");
system("pause");
return 0;
}
if (choix!=1 || choix!=2 || choix!=3)
{
system("cls");
return main();
}
}