1
2
3
4
5
RECT Rect;
HWND hWnd = FindWindow("Shell_TrayWnd", 0);
if (GetWindowRect(hWnd, &Rect)) {
        //Rect.bottom-Rect.top   就是任务栏的高度
}