Today I searched in google for Win7 taskbar progress code. Found an example for D7. At stackoverflow. Then I adapted it for Lazarus. And wrote a demo. All worked. Then i found another example in the Lazarus forum! It was 12 times simpler than previous ex! I found what was simpler:
- CLSID_ const, and Win interfaces are taken from FPC ShlObj
- ComCreate method was called from ComObj unit, simpler
Now my code is 2x smaller.
Also I stripped stuff to do KISS. Stuff is parasite properties: Marquee, and Visible (they were stupid wrappers around Style).
The result is a component with KISS:
https://wiki.lazarus.freepascal.org/Win32TaskbarProgressYou can set Value: 0 to 100.
You can set Style: None, Animation, Normal, Error, Pause.