- #include <iostream.h>
- #include <windows.h>
-
- void IconeBureau (bool afficher)
- {
- HWND hProgMan = ::FindWindow (NULL, "Program Manager") ;
-
- if (hProgMan)
- {
- if (afficher)
- ::ShowWindow (hProgMan, SW_SHOW);
- else
- ::ShowWindow (hProgMan, SW_HIDE);
- }
- }
-
- int main()
- {
- char choix;
- cout<<"Appuyez sur \"A\" pour afficher les icones du bureau et sur \"C\" pour les enlever"<<endl;
- cin>>choix;
-
- if(choix==97)
- IconeBureau(true);
- else if(choix==99)
- IconeBureau(false);
-
- return 0;
- }
-
#include <iostream.h>
#include <windows.h>
void IconeBureau (bool afficher)
{
HWND hProgMan = ::FindWindow (NULL, "Program Manager") ;
if (hProgMan)
{
if (afficher)
::ShowWindow (hProgMan, SW_SHOW);
else
::ShowWindow (hProgMan, SW_HIDE);
}
}
int main()
{
char choix;
cout<<"Appuyez sur \"A\" pour afficher les icones du bureau et sur \"C\" pour les enlever"<<endl;
cin>>choix;
if(choix==97)
IconeBureau(true);
else if(choix==99)
IconeBureau(false);
return 0;
}