4
votes

I'm looking for a way to detect if the user is using small icons : Use small taskbar buttons

I couldn't find anything in GetSystemMetrics \ SystemParametersInfo.
I tried to use the "Running applications" window's size : Running application window

it works fine when the taskbar's orientation is bottom\top, but when it's left\right this window takes the entire taskbar width.

Any ideas?

1
What do you want to do with this information?David Heffernan
@DavidHeffernan - I have a Deskband that draws icons on the taskbar. I want to adjust my icon sizes according to the taskbar's icon sizes.Omer

1 Answers

6
votes

Deskbands are not quite dead on Windows, but they are on life-support. First make sure if you don't want to take advantage of thumbnail toolbars, ITaskbarList3::ThumbBarXxx() functions.

I'm not aware of an api to read back the button size setting. There's a backdoor you can use, these configuration settings are always saved to the registry. Run SysInternals' ProcMon utility and change the setting. On my machine (Windows 8), out popped this registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarSmallIcons

That almost surely works, I can't guarantee anything beyond Windows 8 of course.