At the moment I need to detect in C++/Qt if a taskbar, which is set to "autohide" is visible on the screen or not. I have tried already following solution, unfortunately with no success:
Checked the autohide state with uState = (UINT) SHAppBarMessage(ABM_GETSTATE, pabd), this only returns whether autohide property is set or not
Getting work area with SystemParametersInfo(SPI_GETWORKAREA, 0, &rectWorkArea, 0); Unfortunately the work area is always of size of the entire screen, when taskbar is set to "autohiden", even if it is actually visible on the screen
Geting AppBarData with SHAppBarMessage(ABM_GETTASKBARPOS, &abd); With this function I can get both size and coordinates of the taskbar, however they are always returned as if the taskbar is being visible, even if it is hidden.
So with those methods I cannot tell, whether taskbar with "autohide" on is at given moment visible on the screen or not :-(
I would appreciate any help :-)
See Question&Answers more detail:os