1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67:
| procedure TQipPlugin.DrawSpecContact(PlugMsg: TPluginMessage); var ContactId : DWord; Cnv : TCanvas; R : PRect; wStr : WideString; R1 : TRect; TestIcon : HICON; begin if not Assigned(fmUserOnlineOptions) then Exit;
ContactId := PlugMsg.WParam;
if (ContactId <> fmUserOnlineOptions.UniqContactId) then Exit;
Cnv := TCanvas.Create; try
Cnv.Handle := PlugMsg.NParam;
R := PRect(PlugMsg.Result);
SetBkMode(Cnv.Handle, TRANSPARENT);
TestIcon := LoadImage(FPluginInfo.DllHandle, 'XIcon', IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR or LR_SHARED); DrawIconEx(Cnv.Handle, 8, 2, TestIcon, 16, 16, 0, 0, DI_NORMAL); DestroyIcon(TestIcon);
wStr := 'SetXStatus Optionen';
Cnv.Font.Name := 'Tahoma'; Cnv.Font.Color := clNavy; Cnv.Font.Size := 8; Cnv.Font.Style := [fsBold];
R1.Left:=R^.Left + 26 + FSpecLeft; R1.Top:= R^.Top + 1 + FSpecTop; R1.Right:= R^.Right; R1.Bottom:=R^.Bottom;
DrawTextW(Cnv.Handle, PWideChar(wStr), Length(wStr), R1, DT_LEFT);
finally Cnv.Free; end; end; |