|
Definition at line 72 of file rtl/text.c.
References BOOL, FALSE, GetPrefixCount(), NULL, TRUE, UserGetTextExtentPointW, UserLocalAlloc, and UserLocalFree.
Referenced by BNCalcRect(), DrawStateW(), and xxxBNDrawText().
00077 {
00078 int result;
00079 WCHAR szTemp[255], *pchOut;
00080
00081 if (cch > sizeof(szTemp)/ sizeof(WCHAR)) {
00082 pchOut = (WCHAR*) UserLocalAlloc(0, (cch+1) * sizeof(WCHAR));
00083 if (pchOut == NULL)
00084 return FALSE;
00085 } else {
00086 pchOut = szTemp;
00087 }
00088
00089 result = HIWORD( GetPrefixCount(lpstr, cch, pchOut, cch));
00090
00091 if (result) {
00092 lpstr = pchOut;
00093 cch -= result;
00094 }
00095
00096 UserGetTextExtentPointW(hdc, lpstr, cch, psize);
00097
00098 if (pchOut != szTemp)
00099 UserLocalFree(pchOut);
00100
00101
00102
00103
00104 return TRUE;
00105 }
|