Posted: Thu Jan 23, 2003 10:42 am
Restored from previous forum. Originally posted by Max..
Hi.
At the moment I'm having a rough time, understanding how to deal with that.
I'm calling a custom dll to receive a handle to a font I need later:
When I call the function like
I get both negative and positive values for the handle in different runs. From what I gathered from the forum, this is due to the signed/unsigned problematic & I could use StrU to get the string representation of the unsigned handle - but I do not need a string.
The tips seen so far said: use word if you want unsigned byte range, use long, if you want to use unsigned word range... but as a long is 4 bytes already, how can I store that unsigned except as string? Or is my problem a different one?
*sigh* /me confused
Max.
Hi.
At the moment I'm having a rough time, understanding how to deal with that.
I'm calling a custom dll to receive a handle to a font I need later:
Code: Select all
HFONT SlpCreateFont(LPSTR lpName, int nPoints, int nAttributes);Parameters
lpName
Name of the typeface
nPoints
Height of font, in points
nAttributes
Attributes for the font. See below.
Return Value
If successful, the function returns a handle to the font, otherwise the return value is 0.
Remarks
The nAttribute parameter may be one of the values from the table below. C/C++ programs may
use one or more of the attribute constants (NORMAL, BOLD, ITALIC, and UNDERLINE) defined
in the SLPAPI.H header file.
This function creates a font with the specified typeface and attributes. The returned handle is
used to specify the font when using the text drawing functions. When the font is no longer
needed, the SlpDeleteFont function should be called to release memory used by the font.Code: Select all
fntHandle.l= CallFunction(#SLPAPI42, "SLPCREATEFONT","Arial",8,0)
The tips seen so far said: use word if you want unsigned byte range, use long, if you want to use unsigned word range... but as a long is 4 bytes already, how can I store that unsigned except as string? Or is my problem a different one?
*sigh* /me confused
Max.