Link to home
Start Free TrialLog in
Avatar of BoRiS
BoRiS

asked on

Question for JimBob

how do you add a taskbar on the win95/NT taskbar like powerdesk 97...
Avatar of sortof
sortof

what?
maybe you could descibe this more

many people probably dont have powerdesk 97 or even know what it is... like me
Avatar of BoRiS

ASKER

What I mean is create my own taskbar on the 95 taskbar, like in IE 4 you can have multiple taskbars....

I have tried with SHAppBarMessage etc. but to no avail....
I know what you are talking about.  PowerDesk creates a variety of ToolBars.  These are floating or Docked (I dont have it on this machine, so I cant remember what the other one is).  Basically, if its docked, its like the Windows 95/NT Task Bar.  If its floating, its like Microsoft Offices' Application Tool Bar (or what ever its called).

There is a component called D-TOOLs (I think I found it on DSP).  Its a shareware program, but it does the lot.  Appart from that, I havent seen anything which will make a form dockable to the screen (not just the application).

Sorry I cant help you anymore than that.

Stuart.
Hi boris & all

I think boris is trying to create a taskbar-thing that sits ON the Windows 95 task bar, possibly in the tray window.  I.e. not a separate app bar, but a window INSIDE the existing Win 95 app bar (Taskbar).

Is that correct boris?  Now I may have a chance of getting that thousand bucks off you after all!!  ;-)

JB
Avatar of BoRiS

ASKER

well well

JimBob is back and as witty as hell I see...

Yip JimBob you hit the nail on the head, how do I create my own appbar in the 95/NT taskbar.......... ;-)

BoRiS
Hey borry!!

Here's some routines to get you started...

To get the HWNDs of some of the relevant taskbar windows:  (All variables are of type THandle (or Integer (or whatever)).)

  // Get Win 95 taskbar.
  hTaskbar := FindWindow('Shell_TrayWnd', '');

  // Get tray area on task bar.
  hTrayNotify := FindWindowEx(hTaskbar, 0, 'TrayNotifyWnd', '');

  // Get area of task bar where running programs sit.
  // hTaskSww is a window that sits on hTaskbar.
  // hSysTab (the window we're interested in) sits on hTaskSww.
  hTaskSww := FindWindowEx(hTaskbar, 0, 'MSTaskSwWClass', '');
  hSysTab := FindWindowEx(hTaskSww, 0, 'SysTabControl32', '');


Now, with these you can manipulate the size & positions of some windows.
E.g.  (rWin is declared as a TRect.)
  // Change position of tray area.
  if (hTrayNotify > 0) then
    begin
      GetWindowRect(hTrayNotify, rWin);
      SetWindowPos(hTrayNotify, HWND_TOP, rWin.Left + 1, 0, rWin.Right - rWin.Left, rWin.Bottom - rWin.Top, SWP_NOACTIVATE);
    end;


As an example of putting your Delphi form into the Taskbar, try this:
  // Put this form into taskbar.
  // Note: set caption = '' and BorderStyle = bsNone.
  // Also make this form quite small...
  Self.ParentWindow := hTaskbar;
  // This will put it over your Start button!!
  // Interesting project: write your own start button!
  Self.Left := 0;
  Self.Top := 0;  
  Self.BringToFront;


Note, borry, this is only a primer.  You can fiddle, experiment and generally cause chaos with your system as much as you want...

Regards,
JB
Avatar of BoRiS

ASKER

K thanx JimBob the great...

Knew you would figure it out......

put it thourgh as a answer so I can award you your points man

GEEZ

BoRiS
ASKER CERTIFIED SOLUTION
Avatar of JimBob091197
JimBob091197

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
Avatar of BoRiS

ASKER

Thanx JimBob

If I need Help I'll ask.........

Thanx man

BoRiS