Hi,
ich habe genau diesen Tipp gesucht und komme aber damit nicht zurande. Bei mir wird lediglich die blaue (auf meinem Drucker: graue) Box gedruckt aber ohne Text drin. Woran kann das liegen?
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:
| const pt8 = -44; const1 = 'TEST';
var x1,x2,y1,y2 : Integer; [...] Printer.Canvas.Handle := GetWindowDc(Handle); try GetObject(Font.Handle, SizeOf(LogFont), @LogFont); with LogFont do begin lfEscapement := 90 * 10; lfOrientation := 90 * 10; lfOutPrecision := OUT_TT_ONLY_PRECIS; lfFaceName := 'Arial'; lfHeight := pt8; lfWeight := FW_DONTCARE; lfQuality := PROOF_QUALITY; end; with Printer.Canvas do begin Font.Handle := CreateFontIndirect(LogFont); Font.Color := clWhite; Brush.Color := clNavy; end; tmpRect := Rect(x1, y1, x2, y2); FillRect(tmpRect); DrawText(Printer.Canvas.Handle, PChar(const1), -1, tmpRect, DT_BOTTOM or DT_SINGLELINE); finally end; [...] |
Für jede Hilfe bin ich dankbar,
bis dann
Chrissi
_________________
"... was ich noch zu sagen hätte dauert eine Zigarette, und ein letztes Glas im Steh'n..."