In my windows application, I am trying to find the height of the task bar. While I can hard program this into my program, I would like to find it programmatically to support past, present (win7) and future windows versions.
So, how would I do this?
You get it from GetMonitorInfo()
, MONITORINFOEX.rcWork member.
Get the HMONITOR that you need to call this function from, say, MonitorFromRect(), passing your window rectangle. Or MonitorFromPoint() or EnumDisplayMonitors(), depends where you want to display your window. (0,0) is always the upper left corner of the primary monitor.
Ask Windows about it using the ABM_GETTASKBAR message and specifying the hwnd for the taskbar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With