Windows 7 Beta has been released publicly and can be downloaded from http://www.microsoft.com/windows/windows-7/beta-download.aspx. W7 has made a lot of improvements on the taskbar. For the new features of the taskbar, you can check out http://blogs.msdn.com/e7/archive/2008/11/20/happy-anniversary-windows-on-the -evolution-of-the-taskbar.aspx. If you want to develop Windows 7, it is best to look at the white paper, which can be downloaded from http://code.msdn.microsoft.com/PDC08WhitePapers/Release/ProjectReleases.ASPx?ReleaseId=1797. We will use Windows 7 Taskbar Enhancements for our development of the taskbar. Here we mainly implement Overlay Icons and Progress Bars in the icon of the taskbar. The Windows 7 SDK Beta may also be required during the implementation process.
Start
First find the ShObjIdl.idl file in the Windows SDK. If you don't have the SDK installed, you can download it later. This is an interface definition language file. For convenience of calling, we can similarly
1HRESULT SetProgressValue(
2 [in] HWND hwnd,
3 [in] ULONGLONG ullCompleted,
4 [ ,null,null,3],In] ULONGLONG ullTotal);
This interface declaration is changed to
1HRESULT SetProgressValue(
2 [in] long hwnd,
3 [in] ULONGLONG ullCompleted,
4 [in] ULONGLONG ullTotal);
is to change the HWND type to long. Then use midl to convert the modified idl file to a binary tlb file, ShObjTlb.tlb is the generated file, and ShObjIdl.idl is the original file.
Use tlbimp to generate the managed dll file from the tlb file.
Add a reference to the dll in the project, and then you can call the method like a managed dll.
To achieve progress in the taskbar icon, two functions, SetProgressState and SetProgressState, are used.
The first parameter of the SetProgressState method is the handle, the second parameter is an enumeration variable, indicating the state of the current icon, we can define an enumeration to represent these states
1private enum TbpFlag
2 {
3 TBPF_ERROR = 1,
4 TBPF_PAUSED = 2,
5 TBPF_NORMAL = 3,
6 TBPF_INDETERMINATE = 4,
7 };
Then you can use SetProgressState( (int)this.Handle , TBPFLAG.TBPF_NORMAL); set the icon state to normal.
SetProgressValue((int)this.Handle, 50, 100); You can set the progress, the first parameter is the handle, the second parameter is the completed quantity, and the third parameter is the total amount.
For details on how to use these functions, please check the Windows 7 SDK or the English version of the MSDN Library.
Effects
20% Completion:
50% Completion:
100% Complete Time:
Others
According to this method and referring to the PDC2008 white paper, you can implement other new Windows 7 features in a managed language.
Unmanaged code
If you implement this function in C++, it will be easier. You can refer to the Windows SDK. The path is Microsoft SDKsWindowsv7.0SampleswinuiShellTaskbarIntegrationPeripheralStatus
Today, my friend said that his Windows 7 system theme interface has become the Windows Class
Note is a square or long strip of paper that can be pasted anywhere, so that we can record some info
I dont know if you noticed it. Win7 Ultimate includes a Mobile Center feature, which is desi
Everyone uses a computer to install a variety of applications. In fact, from the earliest Windows un
Solve the problem of Windows 7 can not play Tencent game
Super partition table reconstruction tool
Two disadvantages of the router in the wireless network
Weather Forecast solve Win7 Desktop gadgets can not use the
Windows 7 creates virtual disk partitions
Power management makes Win7 download and standby perfect solution
How to disable Win7 when playing video, screen saver, video, screen saver, graphic tutorial
Various benefits of including frequently used websites into the Win7 taskbar
How to enter Win7 computer security mode
How to find win10/8 photo viewer in win10?
Turn off the shortcut keys to quickly solve the problem of the computer horizontal screen
Win2008 prohibits P2P tool download principle and operation steps
Win10 system switching private or public network method
Metal equipment 5 phantom pain white screen can not enter the game how to do
Openldap installation and configuration basic tutorial
What should I do if the Win7 Device Manager is refreshed after it is opened?
How to set the default input method for win7 system
Reduce the probability of the win7 system IE8 home page is modified
How does Win10 Preview 10041 pin my favorite settings to the Start menu?