Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-02

API Windows Create Font

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luis Del Aguila

I write the next code in my program,

dc:=GetDc(Ventana);
Settextcolor(dc,rgb(0,0,0));
hf1:=CreateFont(20,0,0,0,fw_normal,0 ,0,0,ansi_charset,
                            out_default_precis,clip_default_precis,
                            default_quality,default_pitch or ff_dontcare,
                            'Courier New');
selectObject(dc,hf1);
textout(dc,1,1,'Courier',7);
releasedc(ventana,dc);

but I get this error message :

Free Pascal Compiler version 1.0.4 [2000/12/30] for i386 Copyright (c) 1993-2000 by Florian Klaempfl
Target OS: Win32 for i386
Compiling
c:\docume~1\admini~1\misdoc~1\inve\pascal\pruebas\eid\editor\cfont.pp cfont.pp(20,10) Error: Identifier not found CREATEFONT cfont.pp(93,4) Fatal: There were 1 errors compiling module, stopping

I use the unit Windows.
Why don't FPC 1.0.4 found the CreateFont Function?.

Att.
Luis Del Aguila

Anton Tichawa
to Luis Del Aguila

hi,

i looked into my sources - there's "CreateFontA" instead of "CreateFont".

hth

anton.

Earlier message 39 lines
----- Original Message ----- From: Luis Del Aguila To: Sent: Monday, February 25, 2002 2:12 PM Subject: [fpc-pascal]API Windows Create Font > I write the next code in my program, > > dc:=GetDc(Ventana); > Settextcolor(dc,rgb(0,0,0)); > hf1:=CreateFont(20,0,0,0,fw_normal,0 ,0,0,ansi_charset, > out_default_precis,clip_default_precis, > default_quality,default_pitch or ff_dontcare, > 'Courier New'); > selectObject(dc,hf1); > textout(dc,1,1,'Courier',7); > releasedc(ventana,dc); > > but I get this error message : > > Free Pascal Compiler version 1.0.4 [2000/12/30] for i386 > Copyright (c) 1993-2000 by Florian Klaempfl > Target OS: Win32 for i386 > Compiling > c:\docume~1\admini~1\misdoc~1\inve\pascal\pruebas\eid\editor\cfont.pp > cfont.pp(20,10) Error: Identifier not found CREATEFONT > cfont.pp(93,4) Fatal: There were 1 errors compiling module, stopping > > I use the unit Windows. > Why don't FPC 1.0.4 found the CreateFont Function?. > > Att. > Luis Del Aguila > > > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal