Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the height of the Windows taskbar (Winapi)

How can I calculate the taskbar height, so that my winapi app starts up of it? Now, as it is, when I launch my program, it starts and the bottom of it is placed behind the taskbar. How can I tell my program to move above the taskbar as soon as it starts? I'll mark the right answer.Thnx.

like image 601
A_nto2 Avatar asked Jun 17 '12 15:06

A_nto2


1 Answers

You can use SPI_GETWORKAREA with SystemParametersInfo to get the available screen size, excluding the taskbar, GetSystemMetrics can get you the full screen size, so the taskbar size is just the difference of the axis that the taskbar is one, you should check which axis that is by comparing both axies, as the taskbar my not always be on the bottom.

like image 137
Necrolis Avatar answered Oct 23 '22 03:10

Necrolis