显示任务栏:
void ShowTaskBar()
{
HWND hWnd = ::FindWindow(L"HHTaskBar", NULL);
if (NULL != hWnd)
{
::ShowWindow(hWnd, SW_SHOW);
}
}
隐藏任务栏
void HideTaskBar()
{
HWND hWnd = ::FindWindow(L"HHTaskBar", NULL); // 找到工具栏的句柄
if (NULL == hWnd) return;
::ShowWindow(hWnd, SW_HIDE);
int screenx = GetsystemMetrics(SM_CXSCREEN);
int screeny = GetSystemMetrics(SM_CYSCREEN);
CRect rcWrokArea;
rcWorkArea.left = 0;
rcWorkArea.right = screenx;
rcWorkArea.top = 0;
rcWorkArea.bottom = screeny;
::SystemParametersInfo(SPI_SETWORKAREA, 0, &rcWorkArea, SPIF_SENDCHANGE); // 设置工作区间
}