顯示任務欄:ide
void ShowTaskBar()工具
{top
HWND hWnd = ::FindWindow(L"HHTaskBar", NULL);工作
if (NULL != hWnd)return
{void
::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); // 設置工做區間
}