Recently, the project needs to create a toolbar for Quick Start of the taskbar. I checked a little more information, so I recorded something for your reference.
If you have used ThinkPad, you will find that it has a power indicator. You can right-click the taskbar-> toolbar-> Power Manager to switch. This is also called desk band, which belongs to the taskbar extension, in fact, Microsoft does not recommend using this feature in Windows 7. Microsoft recommends replacing it with thumbnail toolbars. For details about the new features in Windows 7 taskbar, refer to "Features.
Desk band must be implemented on Windows XP
Ideskband interface, required for Windows Vista and Windows 7
Ideskband2 interface, and display the corresponding window.
Code project has several good articles:
. Net implementation, which is problematic on Windows 7. I have not studied it in depth.
Extending Explorer with band objects using. NET and Windows Forms
Http://www.codeproject.com/Articles/2219/Extending-Explorer-with-Band-Objects-using-NET-and
Atl com, this is good:
Shell extensibility-Explorer desk band, Tray notification icon et al.
Http://www.codeproject.com/Articles/39189/Shell-Extensibility-Explorer-Desk-Band-Tray-Notifi
The procedure is as follows:
1. Create a new ATL Project solution;
2. Add a new ATL Object and implement the ideskband2 interface;
3. Implement a window class for display on the toolbar, and create, display, and hide windows in the corresponding interface implementation;
4. Use the in_category_map macro to register the catid_deskband component category.
5. Compile and register.
About registration and display:
1. The registration method is the same for all Windows versions, but adding desk band in the taskbar by code is different in Windows XP, Vista and Windows 7;
2. You can add and remove the desk band in the program, but the host program cannot be closed because the window is created in the Host Program;
3. if you want to appear independently of the application, a warning is displayed on Windows 7. I can see a friend using Windows hook to automatically click the button in the pop-up box, some friends also wrote the registry (the desk band registry is binary and is not compatible after Windows is upgraded). In short, there is no official method and they do not know how the ThinkPad Power Manager works;
4. The code is included in the above example.
Other references related to com ATL:
1. COM Object Model:
2. Component categories
Http://msdn.microsoft.com/en-us/library/windows/desktop/ms686630%28v=vs.85%29.aspx
3. Registering shell extension handlers
Http://msdn.microsoft.com/en-us/library/windows/desktop/cc144110%28v=vs.85%29.aspx
4. implemented_category
Http://msdn.microsoft.com/en-us/library/z4z0at8a%28v=vs.80%29.aspx
5. shellexview v1.68-shell extensions Manager
Http://www.nirsoft.net/utils/shexview.html
6. RGS
The ATL Registry component (Registrar)
Http://msdn.microsoft.com/en-us/library/49tet6k7%28VS.80%29.aspx
Registry map for RGS files
Http://www.codeproject.com/Articles/6319/Registry-Map-for-RGS-files
7. IDL
Midl Language Reference
Http://msdn.microsoft.com/en-us/library/aa367088.aspx
Basics of an IDL file
Http://www.codeproject.com/Articles/19605/Basics-of-an-IDL-file
IDL details
Http://blog.csdn.net/weiqubo/article/details/6990697
Com proxy and stub
Http://www.cnblogs.com/zhy113/archive/2010/10/29/1864156.html