Autor Beitrag
jojo-sp
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 317

Windows XP Prof, Vista Ultimate & Home Premium, Windows 7
Delphi 7 Enterprise, Delphi 2009
BeitragVerfasst: Fr 09.09.05 09:25 
Hallo,

ich will einen Text um 90° Grad drehen. Dazu habe ich einfach erstmal folgenden Code auf Button.Click gelegt.
Wenn ich jetzt aber auf den Button klicke, meldet Delphi sich mit der Bereichsüberprüfung zu Wort.
Habe ich einen falschen Parameter eingegeben oder woran liegt dies?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Var Dc : HDC;
    hFont, FontOld : Integer;
begin
  Dc := Canvas.Handle;
  hFont := CreateFont(12,0,900,0,0,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,
    CLIP_DEFAULT_PRECIS,PROOF_QUALITY,DEFAULT_PITCH,'ARIAL');
  FontOld := SelectObject(Dc,hFont);
  Canvas.Textout(20,20,'12');
  SelectObject(Dc,FontOld);
  DeleteObject(hFont);
  Canvas.Textout(40,20,'12');
end;


MfG

_________________
Ist der Ruf erst ruiniert, lebts sich gänzlich ungeniert...
Wilhelm Busch (1832 - 1908)
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Fr 09.09.05 10:06 
Hallo,

Delphi 3 meldet sich nicht mit der Bereichsprüfung bei deinem Code.
Es funktioniert einwandfrei.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
jojo-sp Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 317

Windows XP Prof, Vista Ultimate & Home Premium, Windows 7
Delphi 7 Enterprise, Delphi 2009
BeitragVerfasst: Fr 09.09.05 10:48 
Delphi 4 schon :D .

Da ich gerade kein D7 zur hand habe, kann ich es leider nicht damit testen.

_________________
Ist der Ruf erst ruiniert, lebts sich gänzlich ungeniert...
Wilhelm Busch (1832 - 1908)
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Fr 09.09.05 11:20 
bei delphi 7 funkioniert das auch ohne probleme

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Fr 09.09.05 11:33 
Hallo,

befindet sich in deiner Anwendung nur der Button und der zugehörige Code?
kannst Du also einen Zusammenhang mit anderen Teilen der Anwendung ausschließen?

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
jojo-sp Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 317

Windows XP Prof, Vista Ultimate & Home Premium, Windows 7
Delphi 7 Enterprise, Delphi 2009
BeitragVerfasst: Fr 09.09.05 11:34 
Habt ihr denn die Bereichs und die Überlaufprüfung für en Compiler an?

_________________
Ist der Ruf erst ruiniert, lebts sich gänzlich ungeniert...
Wilhelm Busch (1832 - 1908)
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Fr 09.09.05 11:38 
Hallo,

ja, alle mögliche Einstellungen ausprobiert, kein Fehler.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
jojo-sp Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 317

Windows XP Prof, Vista Ultimate & Home Premium, Windows 7
Delphi 7 Enterprise, Delphi 2009
BeitragVerfasst: Fr 09.09.05 13:08 
Habs!

OldFont muss eine 32 Bit variable sein, also ein Cardinal - Typ.
Wieso dass nur bei Delphi4 meckert -> keinen blassen Schimmer...

_________________
Ist der Ruf erst ruiniert, lebts sich gänzlich ungeniert...
Wilhelm Busch (1832 - 1908)