I have a mixed CBuilder/Delphi dll that I load from a non-VCL host application. I'm using RAD Studio XE2. Upon loading the dll I set the Application handle to the host's main form, which has the effect of keeping my forms and dialogs off of the taskbar. However I would like to show the progress bar on the taskbar and have it stack with the host application. I've googled and searched extensively but can't find anything similar.
Dr. Bob wrote a nice tutorial here on the various features of the taskbar and from that I've gotten a progress bar showing up in the main application's taskbar button, but I really want to create a second 'stacked' icon for the progress bar, which a lot of applications do. Dr. Bob's example assumes you are part of the main application and uses this code to add a tab:
if not Application.MainFormOnTaskBar then
FormHandle := Application.Handle
else FormHandle := Application.MainForm.Handle;
TaskbarList.AddTab(FormHandle);
which doesn't do anything in my case. I've tried
FormHandle := FindWindow('TfmProg', NIL);
TaskbarList.addTab(FormHandle);
but that doesn't change anything.
I've created the form with Application as the owner, and NIL. I've created it fsNormal or fsStayOnTop. Frankly, I've touched every parameter I can get at, but nothing seems to work.
AddTabfails to add a tab, it should return an HResult telling you why. What does it tell you in this case? - Rob Kennedy