Oxygen Basic
Programming => Example Code => Topic started by: Peter on December 19, 2010, 11:52:35 AM
-
Deleted
-
Will do! Thanks Peter.
Charles
-
Peter,
I checked low level bind for CreateFont and found it worked correctly but I agree that declaring this function is more satisfactory.
a=fw_bold or fw_light
hFont = CreateFont (80,16,0,0,a,0,0,0,0,0,0,0,0,"times")
With low level binding:
1 You are restricted to passing variable and constants of the matching type.
2 Array variables, Functions and expressions cannot be passed as parameters.
3 Dynamic strings must be passed with the correct indirection - usually *string.
4 There is no automatic check that the binding was successful (typos etc).
Charles
-
Ah yes,
you need alias CreateFontA for ansi fonts
CreateFont CreateFontA
You can check for run time errors after binding like this
string e
e=error
if e then
print e
'... termination procdures
end if
if there is a runtime problem then error() returns a string listing the errors then automatically clears the error buffer.
Charles