Zitat:
COPYDATASTRUCT *cpData = (COPYDATASTRUCT *)lParam;
if (cpData->dwData == 1) {
iconData = (NOTIFYICONDATA *) (((BYTE *)cpData->lpData) + 8 );
trayCommand = *(INT *) (((BYTE *)cpData->lpData) + 4);
}
So ganz "straightforward" wäre es:
Delphi-Quellcode:
type PCOPYDATASTRUCT = ^COPYDATASTRUCT;
var cpData : PCOPYDATASTRUCT;
begin
cpData := PCOPYDATASTRUCT(lParam);
if (cpData^.dwData = 1) then
begin
iconData := ^NOTIFYICONDATA ( ( ( PBYTE(cpData->lpData) ) + 8 ) );
trayCommand := ( pinteger( ( ( PBYTE(cpData^.lpData)) + 4) ))^;
end;
Ob es funct ist eine andere Frage....