Hallo Leute,
ich versuche verzweifelt mein Icon anzeigen zu lassen nur irgend wie bekomme ich das nciht hin.
Hier mal mein Code:
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:
| procedure TQipPlugin.DrawSpecContact(PlugMsg: TPluginMessage); var ContactId : DWord; wStr : WideString; Cnv : TCanvas; R : PRect; R1 : TRect; TestIcon : TICON; begin DllPathlenght := length(FDllPath); DLLPath := copy(FDllPath,0,DllPathlenght-18); if not Assigned(FfrmMain) then Exit;
ContactId := PlugMsg.WParam;
if (ContactId <> FfrmMain.UniqContactId) then Exit;
Cnv := TCanvas.Create; try
Cnv.Handle := PlugMsg.NParam;
R := PRect(PlugMsg.Result);
SetBkMode(Cnv.Handle, TRANSPARENT);
TestIcon := TIcon.Create; TestIcon.LoadFromFile(DLLPath + 'Hilfe.ico');
wStr := 'Hilfe';
Cnv.Font.Name := 'Tahoma'; Cnv.Font.Color := clNavy; Cnv.Font.Size := 8; Cnv.Font.Style := [fsBold];
R1 := Rect(R^.Left + 26 + FSpecLeft, R^.Top + 1 + FSpecTop, R^.Right, R^.Bottom);
DrawTextW(Cnv.Handle, PWideChar(wStr), Length(wStr), R1, DT_LEFT); TestIcon.Free; finally Cnv.Free; end; end; |
kann mir jemand sagen wie ich es anstellen muss, das mein icon angezeigt wird?
Danke schon mal an alles fürs Helfen.
Mfg Dog.
Moderiert von
Kha: Topic aus Sonstiges (Delphi) verschoben am Sa 14.03.2009 um 17:11