HWND hTaskBar=FindWindow("Shell_TrayWnd",NULL);//find taskbar handle
HWND hDeskIcon=FindWindow("Progman",NULL); //find desktop icons
HWND hStartMenuIcon=FindWindow("Button",NULL); //find startmenu icons
if(bshow)
{
ShowWindow(hTaskBar,SW_SHOW);
ShowWindow(hDeskIcon,SW_SHOW);
ShowWindow(hStartMenuIcon,SW_SHOW);
}
else{
ShowWindow(hTaskBar,SW_HIDE);
ShowWindow(hDeskIcon,SW_HIDE);
ShowWindow(hStartMenuIcon,SW_HIDE);
}
转自:https://blog.csdn.net/ych121/article/details/79221253