Sack Library Documentation
sack::image::GetStringSizeFontEx Function
__cdecl IMAGE_PROC _32 GetStringSizeFontEx(CTEXTSTR pString, size_t len, _32 * width, _32 * height, Font UseFont);
_32 (* GetStringSizeFontEx)(CTEXTSTR pString, size_t len, _32 *width, _32 *height, Font UseFont);
#define GetStringSize(s,pw,ph) GetStringSizeFontEx( (s),(s)?strlen(s):0,pw,ph,NULL)
The string to measure 
size_t 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.

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!