Get the height of the Windows taskbar (Winapi)

How to calculate the height of the taskbar so that my winapi application launches it? Now, when I launch my program, it starts, and the lower part of it is located behind the taskbar. How can I say that my program moves over the taskbar as soon as it starts? I will put the correct answer. Thnx.

+5
source share
1 answer

You can use SPI_GETWORKAREAwith SystemParametersInfoto get the available screen size, excluding the taskbar, you GetSystemMetricscan get the full screen size, so the size of the taskbar is just the difference in the axis the taskbar is on, you have to check which of these axes, comparing both axes , since my taskbar is not always at the bottom.

+5
source

All Articles