How to create own control in Windows 7 Aero task p

2019-02-05 01:52发布

问题:

I've got two questions about Windows 7 task preview. In Delphi I'd like to create my own buttons inside the area highlighted in the screenshot below.

1) Is it possible to create my own controls in the task preview window (in Windows 7) like e.g. Winamp can do ? Or it's just some limited multimedia extension ?

2) If it's possible to draw there own buttons where should I start ? Example or Windows API guide-post would be helpful for me.



Thanks a lot in advance

回答1:

Yes you can, check these components Windows 7 Components from Daniel Wischnewski to see an example.

this is a screen-shot from the demo app included with the components.



回答2:

They are called Thumbnail toolbars. I'm not aware of any Delphi code to wrap this up, but I'm probably wrong! If I'm right, then you'll need to declare some COM interfaces and drive them appropriately - not really too difficult.



回答3:

No, those are defined by Windows (and always will be buttons) and you can provide the icons that appear on them. Here is a white paper on the API to do it.

  • http://msdn.microsoft.com/en-us/magazine/dd942846.aspx#id0420081

  • http://blogs.microsoft.co.il/blogs/sasha/archive/2009/02/26/windows-7-taskbar-thumbnail-toolbars.aspx