Link to home
Start Free TrialLog in
Avatar of flexiwebsw
flexiwebswFlag for United Kingdom of Great Britain and Northern Ireland

asked on

iDeskBand2 in delphi

I am looking for a way to implement the iDeskBand2 feature into delphi, ive managed to get th ideskband to work but i need the ideskband 2 to work, for transparency in windows 7.

ive read through this:

http://msdn.microsoft.com/en-us/library/bb762064%28v=VS.85%29.aspx

but i still cannot get it to work, any help would be greatly appreciated.
Avatar of aikimark
aikimark
Flag of United States of America image

[IDeskBand2 may be altered or unavailable in subsequent versions of the operating system or product.]
Avatar of flexiwebsw

ASKER

thanks for the comment, i just need it to work because i cannot get the ideskband to work in wondows 7 but ideskband 2 works, but i cannot find a way with delphi.
Do you need an iDeskband2 solution or a work-around solution?  From the (posted) Microsoft comment, it might not be possible to use iDeskband2.
 
either one i dont mind, i just need the deskband in delphi to work wityh windows 7, ive tried it in xp and it works fine, and i can get it to work in internet explorer in windows 7 just not windows 7 deskband, ive tried it with a clean install too with no luck.
If no other Delphi expert comments in this thread, click the Request Attention link and ask for greater visibility amongst the Delphi experts.
ok will do thanks
Most any expert here could help if you could answer a couple questions.
Does it really work under Win7?
Have you seen code claiming to work explicitly for WIN7?

Considering the massive taskbar changes in Win7, it would not surprise me if it nolonger works.
i know that ideskband 2 works fine in windows 7 because ive got an example of an application written in C that uses a mixture of ideskband for older windows versions and ideskband 2 for use with windows vista and onwards. so it is possible and ive gotten the ideskband working in windows xp just not windows 7 and i dont know how to implement ideskband 2 into delphi.
Have you run the c code on Win7 ?
the implementation would not be any different, if it is a valid object.
yes i have i said that in the previous post, i said it works fine in windows 7 cause ive got some c code that works,

ive tried it in windows 7 and it works just how id expect, i just dont knkow how to implement it in delphi, im after some example delphi code. or some help with converting the c code to delphi.
>> some help with converting the c code to delphi

Attach or Post the C code .
I dont know which files i need to send for you to convert it, but here is the link to rapidshare where the C example is:

http://rapidshare.com/files/418081821/CalendarDeskBand.zip
My corporate proxy blocks that site.
if you got Deskband to work on XP is should work on Win7.

http://msdn.microsoft.com/en-us/library/bb762064(VS.85).aspx
States; "The IDeskBand2 interface inherits from IDeskBand. "
So if Deskband2 exists on Win7 then Deskband exists on Win7.
"How do I make it work"  is too vague for me for me to answer.
i got deskband to work in xp, but it does not work inwindows 7 and i dont know why, its exactly the sane dll, ive registerd it in the same way, it shows up in internet explorer in windows 7 but not the taskbar however it shows up on the taskbar in windows xp.

Here is the one im tryig to test out.
SearchBarBand.dll
Did you see this;  http://msdn.microsoft.com/en-us/library/dd378460(VS.85).aspx
Deskbands
In versions of Windows prior to Windows 7, something similar to thumbnail toolbar functionality could be achieved through a deskband—a toolbar hosted in the taskbar. For instance, Windows Media Player could minimize to the taskbar as a set of transport controls rather than a standard button. In Windows 7, deskbands can still be implemented and thumbnail toolbars are not intended to replace them all. Not all applications will lend themselves to a thumbnail toolbar, and another solution such as a deskband or a task in a destination list might be the right answer for your application; you must decide which solution works best for your application as part of your development cycle. However, be aware that deskbands must support Windows Aero with translucency ("glass") enabled and the IDeskBand2 interface.
So if you code is only implementing IDeskBand it will not work on Win7 taskbar.
yes and that is why i asked about the ideskband2, the C sample i posted implements both the ideskband and the ideskband2 interface to allow usage in windows 7 and earlier versiona of windows.
If you know how to implement ideskband  in Delphi, I don't understand why you wouldn't know how to implement ideskband2? If you haven't implemented ideskband either then you have a *much bigger* learning curve. I suppose you could upload your project.
iDeskband/2 is defined in the ShlObj.pas file. In my Delphi 2007 ShlObj file there is no iDeskband2 definition.In my Delphi XE ShlObj file there *is* a iDeskband2.   :) Make the changes to include I compiled your demo on DelphiXE and it works fine on Win7-32bit AND WinXP 32bit.I'm not willing to try to hack  the new ShlObj.pas file into my D2007 but here it is if you want to try it.Or maybe just take iDeskBand2 references.
I guess it was a deskband demo I downloaded from embarcadero
http://cc.embarcadero.com/Item/23879
 
shlobj additions something like  ;-)
...
{$HPPEMIT 'DECLARE_DINTERFACE_TYPE_UUID("79D16DE4-ABEE-4021-8D9D-9169B261D657", IDeskBand2)'}
...
SID_IDeskBand2  = '{79D16DE4-ABEE-4021-8D9D-9169B261D657}';
...
  IID_IDeskBand2: TGUID  = SID_IDeskBand2;
  {$EXTERNALSYM IID_IDeskBand2}

...
{ interface IDeskBand2 }
  IDeskBand2 = interface(IDeskBand) 
    [SID_IDeskBand2]
    function CanRenderComposited(
      var pfCanRenderComposited: BOOL): HRESULT; stdcall;
    function SetCompositionState(fCompositionEnabled: BOOL): HRESULT; stdcall;
    function GetCompositionState(var pfCompositionEnabled: BOOL): HRESULT; stdcall;
  end;
  {$EXTERNALSYM IDeskBand2}

Open in new window

I got the ideskband from an example prject from the web, however i cannot implement the ideskband 2, as i do not know how.

and im jealous, i wish i had delphi XE its 2.5 grand lol.

as EE doesnt like most delphi project filed, or all that coem with the project ive uploaded it to rapidshare for you to look at, perhaps you could implement the ideskband2 then send it back.
Work had maintenance agreement. <2.5g  :)
If it isn't too many hours.
Like before the site is blocked by corp proxy I was able to get to fwsw.co.uk/secure/
hmm lucky you :D

and sorry about that, i forgot, i even forgot to send the rapid link =}, here it is on my site:

http://www.fwsw.co.uk/secure/Toolband.zip
ASKER CERTIFIED SOLUTION
Avatar of briangochnauer
briangochnauer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
btw,
I tested the compiled DLL on both  XP 32bit and Win7 32-bit. both worked.
Win7 64b did not work, of course.
thanks it works, but how do i get it to work in windows 7 64-bit, the C example posted above allows it to work in there how come the delphi code wont?
I'm assuming it's because there is no 64-bit Delphi compiler... yet.
Didn't you have to compile the C code in 64bit to get it to work?
i only tried the pre-compiled C code i didnt compile any myself

so i have to find a way of compiling delphi in 64-bit if i want it to work in windows 64-bit?
The calendarDeskband.zip file you sent me had no pre-compiled  dll in it.??
There is no 64bit compiler for Delphi if you load Delphi onto a 64bit Windows machine is still compiles 32bit..
If the c code does work on all 3 version then there *must be* a way to register the DLL to get it to work on 64bit.
the VC project you sent shows two compiler environments for 32 and 64 bit.
Can you verify that it runs on all three platforms??
...
            <Configuration
                  Name="Release|Win32"
...
and
...
            <Configuration
                  Name="Release|x64"
btw,
Embarcadero has just published the new RAD Studio Roadmap. http://edn.embarcadero.com/article/39934
This Roadmap includes information on the upcoming Delphi Fulcrum, supporting both Windows and Mac OS X application development, Delphi Wheelhouse (adding Linux support), the 64-bits Compiler Preview (early 2011), Delphi Commodore (the full 64-bits version) and project Chromium.
it does run on all three, and hmm that seems interesting i will defenatly check it out.
can you post the compiled dll
btw,
Did you get in to compile and run on Win7 32 bit?
i dont have an active win7 32 but ill install on in vmware tomorrow and see if it works

nd here is the compiled C code that works in 64-bit.
CalendarDeskBand.dll
That DLL is 64-bit, it would not register on either Win7 32-bit or XP 32-bit.
As I suspected you have to either target 32-bit or 64-bit, since currently there is only a 32-bit compiler for Delphi you can not target 64-bit systems.
I still suspect there is a way to get a 32-bit DLL to run on a 64-bit system since there are many 32-bit DLLs in SYSWOW64 (32-bit System) directory.
How clever of Microsoft;  to call the 64-bit system directory 'System32' and the 32-bit system directory 'SysWOW64' and ONLY on 64-bit OS !!!  
 
Sorry, No 32-bit Explorer shell support on 64-bit OS.
http://www.techsupportalert.com/content/how-windows7-vista64-support-32bit-applications.htm
"Under 64 bit Windows it is not possible to inject 32 bit code into a 64 bit process, nor is it possible to inject 64 bit code into a 32 bit process. This explains why most 32 bit shell extensions do not work under Windows 7 64."
flexiwebsw,
Did you resolve the issue?
The implementation of iDeskband I gave you resolved the issue of running on XP and Win7, if only on 32-bit.
Not exactly what i was after but i will have to put up with it untill delphi make a 64-bit compiler.