Documentation Project 1
sack::image::GetStringSizeFontEx Function
__cdecl IMAGE_PROC _32 GetStringSizeFontEx(CTEXTSTR pString, _32 len, _32 * width, _32 * height, Font UseFont);
#define GetStringSize(s,pw,ph) GetStringSizeFontEx( (s),(s)?strlen(s):0,pw,ph,NULL)
#define GetStringSizeFont(s,pw,ph,f) GetStringSizeFontEx( (s),(s)?strlen(s):0,pw,ph,f )
The string to measure 
_32 len 
the length of characters to count in string 
_32 * width 
a pointer to a _32 to receive the width of the string 
_32 * height 
a pointer to a _32 to receive the height of the string 
Font UseFont 
A Font to use. 

Returns the width parameter. If NULL are passed for width and height, this is OK. One of the simple macros just passes the string and gets the return - this is for how wide the string would be.

Returns the approximate rectangle that would be used for a string. It only counts using the line measurement. Newlines in strings count to wrap text to subsequent lines and start recounting the width, returning the maximum length of string horizontally.

Copyright (c) 2010. All rights reserved.
What do you think about this topic? Send feedback!