Source file: /~heha/messtech/ddegpib.zip/SRC/TRAY16.PAS

unit tray16;
{macht den SysTray von 16 bit aus zugänglich via Generic Thunk,
 nur aufrufen, wenn Windows-Version >=3.95!}
{$F-,A+,G+,K+,W-}
{$I-,Q-,R-,S-}
{$V+,B-,X+,T+,P+}
interface
 uses WinTypes;
const
 NIM_Add	=0;
 NIM_Modify	=1;
 NIM_Delete	=2;
 NIF_Message	=1;
 NIF_Icon	=2;
 NIF_Tip	=4;
type
 PNotifyIconData=^TNotifyIconData;
 TNotifyIconData=record
  cbSize: LongInt;
  hwnd: LongInt;
  uID: LongInt;
  uFlags: LongInt;
  uCallbackMessage: LongInt;
  hIcon: LongInt;
  szTip: array[0..63] of Char;
 end;

function Shell_NotifyIcon(Message:Word; const nid:TNotifyIconData):Bool;

implementation
 uses Thunk16;

function Shell_NotifyIcon(Message:Word; const nid:TNotifyIconData):Bool;
 var
  hShell32, lpSNI: LongInt;
 begin
  hShell32:=LoadLibraryEx32W('SHELL32.DLL',0,0);
  lpSNI:=GetProcAddress32W(hShell32,'Shell_NotifyIconA');
  Shell_NotifyIcon:=Bool(CallProc32W2(Message,LongInt(@nid),lpSNI,1,2));
  FreeLibrary32W(hShell32);
 end;
end.
Detected encoding: OEM (CP437)1
Wrong umlauts? - Assume file is ANSI (CP1252) encoded