well i’ve found in MSDN a fonction called : GetCharABCWidthsFloat ; it seems to be better than GetCharWidth32 or GetCharWidthFloat, and here is its description:
HDC hdc, // handle to DC
UINT iFirstChar, // first character in range
UINT iLastChar, // last character in range
LPABCFLOAT lpABCF // array of character widths
[in] Handle to the device context.
[in] Specifies the code point of the first character in the group of consecutive characters where the ABC widths are sought.
[in] Specifies the code point of the last character in the group of consecutive characters where the ABC widths are sought. This range is inclusive. An error is returned if the specified last character precedes the specified first character.
[out] Pointer to an array of ABCFLOAT structures that receives the character widths, in logical units.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
i call it like that :
of course after having declared :
but the pb is that the value of isOK is always 0, ie the function fails, and i don’t know why!!!
using GetLastError() i got error 87, ie according to MSDN System Error Codes : The parameter is incorrect (ERROR_INVALID_PARAMETER) !!!
please help i can’t see where the error is
PS : if someone wants the MSDN page it’s : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_3ook.asp