PHP中文网2017-04-17 13:39:53
SetProgressValue Method
http://msdn.microsoft.com/en-us/library/dd391698(VS.85).aspx
SetProgressState Method
http://msdn.microsoft.com/en-us/library/dd391697(VS.85).aspx
PHP中文网2017-04-17 13:39:53
In MFC:
MSDN - ITaskbarList3 Interface
Initialize COM interface
CoCreateInstance( CLSID_TaskbarList, nullptr, CLSCTX_ALL, __uuidof(ITaskbarList3), (LPVOID*)&m_pTL3 );
Registration message
static const UINT WM_TBC = RegisterWindowMessage(TEXT("TaskbarButtonCreated"));
Show status
m_pTL3->SetProgressState(GetSafeHwnd(), TBPF_ERROR);
m_pTL3->SetProgressState(GetSafeHwnd(), TBPF_PAUSE);
m_pTL3->SetProgressState(GetSafeHwnd(), TBPF_NORMAL);
Show progress
m_pTL3->SetProgressValue(GetSafeHwnd(), 50, 100);
Release
m_pTL3->Release();
m_pTL3 = nullptr;
大家讲道理2017-04-17 13:39:53
This can be achieved using QWinExtra.
pro file added: QT += winextra.
Refer to the four classes QWinTaskbarButton, QWinTaskbarProgress, QWinThumbnailToolBar, and QWinThumbnailToolButton.
You can refer to winextra/music player in Qt Examples.