Welcome! Log In Create A New Profile

Advanced

WD 12 iCreateFont style

Posted by Rich 
Rich
WD 12 iCreateFont style
December 06, 2008 08:29PM
The style parameter of iCreateFont takes integer constants or combination of constants.

So, iBold is 8 and iItalic is 4.

But iBold + iItalic is 84. :confused:

The other font commands do the same.

Is there a way to create this constant in code?
Jimbo
Re: WD 12 iCreateFont style
December 07, 2008 09:52AM
Hi Rich,

you're right, many of those constants are integers. It would be just as fine to put an integer variable there with a value of 84, it works like that for some other constants to my experience. Maybe, it works for the iCreateFont-Parameters too. Most of the parameters in WinDev are in fact combinations of ^2 numbers. 84 = 64 + 16 + 4. I suspect, the '4' means 'normal'. On run-time, the parameter is inspected by the WD-language interpreter and single bits of the parameter have the meaning of certain functions.

As a result of this, I could imagine that you have a font-file for a given project and create all the fonts for a printing procedure using a loop. Just an idea:

Hreadfirst(MyFontFile, MyFontNumber)
while not hout(MyFontFile)
iCreateFont(MyFontNumber, ..)
HreadNext(MyFontFile)
END

Kind regards,
Guenter
Rich
Re: WD 12 iCreateFont style
December 07, 2008 02:15PM
Guenter,

Thanks for the response.

I am doing something very similar and it seems to be working ok.smiling smiley
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: