#include "windows.h"
#include "stdio.h"
/*Variables globales*/
HWND ventana,ventana2;
char resp;
/*definciones*/
void taskbar(char on);
void tray(char on);
void windo(char on);
void launch(char on);
void inicio(char on);
void opciones(void);
int main()
{
for(;;)
{
opciones();
}
return 0;
}
/*Opciones a elejir*/
void opciones()
{
printf("\t\t\tEsconder botones de windows\n\n\n");
printf("Elija una opcion:\n\n");
printf("A)Esconder taskbar\na)Mostrar taskbar\n");
printf("B)Esconder tray y reloj\nb)Mostrar tray\n");
printf("C)Esconder Ventanas minizadas\nc)Mostrar ventanas minimizadas\n");
printf("D)Esconder QuickLaunch\nd)Mostrar QuickLaunch\n");
printf("E)Esconder boton de Inicio\ne)Mostrar boton de inicio\n");
printf("Elija una opcion y pulse enter :");
resp = getchar();
switch (resp)
{
case 'A':
taskbar('s'); break;
case 'a':
taskbar('n'); break;
case 'B':
tray('s'); break;
case 'b':
tray('n'); break;
case 'C':
windo('s'); break;
case 'c':
windo('n'); break;
case 'D':
launch('s'); break;
case 'd':
launch('n'); break;
case 'E':
inicio('s'); break;
case 'e':
inicio('n'); break;
}
system("cls");
}
/*Funcion para esconder taskbar*/
void taskbar(char on)
{
if (on=='s')
{
ventana = FindWindowA("Shell_traywnd",NULL);/*Encontramos el Handle */
ShowWindow(ventana,SW_HIDE);/*Se oculta con SW_HIDE*/
}
else
{
ventana = FindWindowA("Shell_traywnd",NULL);
ShowWindow(ventana,SW_SHOW);
}
}
//Funcion para Iconos minizados y reloj en el taskbar
void tray(char on)
{
if (on=='s')
{
ventana = FindWindowA("Shell_traywnd",NULL);
ventana2 = FindWindowExA (ventana,NULL,"TrayNotifywnd",NULL);/*Entre las ventanas
hijas buscamos El tray*/
ShowWindow(ventana2,SW_HIDE);
}
else
{
ventana = FindWindowA("Shell_traywnd",NULL);
ventana2 = FindWindowExA (ventana,NULL,"TrayNotifywnd",NULL);
ShowWindow(ventana2,SW_SHOW);
}
}
//Ventanas en taskbar
void windo(char on)
{
if (on=='s')
{
ventana = FindWindowA("Shell_traywnd",NULL);
ventana2 = FindWindowExA (ventana,NULL,"ReBarWindow32",NULL);
ShowWindow(ventana2,SW_HIDE);
}
else
{
ventana = FindWindowA("Shell_traywnd",NULL);
ventana2 = FindWindowExA (ventana,NULL,"ReBarWindow32",NULL);
ShowWindow(ventana2,SW_SHOW);
}
}
//Quick launch
void launch(char on)
{
if (on=='s')
{
ventana = FindWindowA("Shell_traywnd",NULL);
ventana2 = FindWindowExA (FindWindowExA(ventana,NULL,"ReBarWindow32",NULL),NULL,"ToolBarWindow32",NULL);
ShowWindow(ventana2,SW_HIDE);
}
else
{
ventana = FindWindowA("Shell_traywnd",NULL);
ventana2 = FindWindowExA (FindWindowExA(ventana,NULL,"ReBarWindow32",NULL),NULL,"ToolBarWindow32",NULL);
ShowWindow(ventana2,SW_SHOW);
}
}
//Boton de inicio
void inicio(char on)
{
if (on=='s')
{
ventana = FindWindowA("Shell_traywnd",NULL);
ventana2 = GetWindow(ventana,GW_CHILD);
ShowWindow(ventana2,SW_HIDE);
}
else
{
ventana = FindWindowA("Shell_traywnd",NULL);
ventana2 = GetWindow(ventana,GW_CHILD);
ShowWindow(ventana2,SW_SHOW);
}
}