I have been searching for how to develop new features of Windows 7 on the Internet, but all of them are managed by. net.CodeSorry, I cannot understand it. Then I suddenly thought that the compiled version of mplayer WW now supports the features of Windows 7, so I ran to see it.Source code. I found a win7shellapi. h. Download it and open it. Hey hey, there is the itaskbarlist3 that I want. By the way, these functions of win7 are implemented through the COM interface.
: Https://mplayer-ww.svn.sourceforge.net/svnroot/mplayer-ww/trunk/mplayer/win7shellapi.h
Now that you have found the header file, it is easy. For convenience, I use MFC for demonstration.
// Introduce the header file # Include "win7shellapi. H" Void Cmydlg :: Onbutton1 ( ) { Itaskbarlist3* Ptaskbarlist = Null ; Coinitialize ( 0 ) ; Cocreateinstance ( Clsid_taskbarlist, Null , Clsctx_all, iid_itaskbarlist, ( Void ** ) & Ptaskbarlist) ; Ptaskbarlist - > Setprogressstate ( This - > Getsafehwnd ( ) , Tbpf_paused ) ; Ptaskbarlist - > Setprogressvalue ( This- > Getsafehwnd ( ) , 7 , 10 ) ; } |
When you click the button1 button, you will find a progress bar on the taskbar. Enjoy it now.