tags:

views:

17

answers:

1

I am building an RDP client and I have toolbar that shows the running applications, same as the Windows toolbar. I need to support dual monitors, so my questions are 1) How do I detect that there is more than one monitor and 2) Is there a formula for calculating the width of the icons on the toolbar?

I know that at the start, the width is not dependent on the number of monitors, and is always the same size. What does change is the number of icons I can display before I must start "shrinking" their width, and it will depend on the screen resolution as well.

Any ideas?

A: 

Answering 1) - There is the EnumDisplayMonitors function. Now regarding 2) - What do you mean with "like the windows toolbar"? If you mean something similar to the taskbar then I guess it mainly depends on what icon sizes you want to use. All the standard application icons usually supply icon sizes of 16x16, 24x24, 32x32, 48x48 and so on. There's no universal formula - you know how much width you have available, and then you decide on which icon size to use. But keep in mind that you eventually will run out of space no matter how small the icon, so perhaps you should think of adding some sort of scroll button. Hope that helps.

humbagumba