I have two different applications, both native applications written in C++Builder 2009, both MDI, and both using the same progress bar utility code. One of them properly updates the Windows 7 taskbar with its progress. The other one doesn't.
I can't find any obvious differences between the two applications. No errors are reported in the failing application: the calls to ITaskbarList3::SetProgressValue
and ITaskbarList3::SetProgressState
return S_OK
, but nothing happens in the Windows 7 taskbar.
Are there any gotchas in getting the Windows 7 taskbar progress bar to work? Any requirements that I might be missing?
My problem was likely specific to Delphi/C++Builder and was the result of a difference in how the VCL handles its top-level window.
If Application.MainFormOnTaskBar
is true, then ITaskbarList3
only works if Application.MainFormHandle
is used as the HWND parameter.
If Application.MainFormOnTaskBar
is false, then ITaskbarList3
only works if Application.Handle
is used as the HWND parameter.
In my case, one project had MainFormOnTaskBar
true, and one had it false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With