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: Word; ali0: Word;
wnd: HWnd; ali1: Word; {wirklich so in Win32}
uID: Word; ali2: Word;
uFlags: Word; ali3: Word;
uCallbackMessage: Word; ali4: Word;
hIcon: HIcon; ali5: Word;
szTip: array[0..63] of Char;
end;
function Shell_NotifyIcon(Message:Word; nid:PNotifyIconData):Bool;
implementation
uses Thunk16;
function Shell_NotifyIcon(Message:Word; nid:PNotifyIconData):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.
Vorgefundene Kodierung: UTF-8 | 0
|