Adapt VS2019

This commit is contained in:
Don HO 2020-01-09 10:36:44 +01:00
parent 1cb54aa4ef
commit 87d6cd1d04

View File

@ -1305,16 +1305,18 @@ int FindLongestLine(HDC hdc,TCHAR* text,SIZE* size)
TCHAR *p; TCHAR *p;
wcscpy_s(temptext,text); wcscpy_s(temptext,text);
p = generic_strtok(temptext, TEXT("\n")); p = wcstok(temptext, TEXT("\n"));
while(p) while(p)
{ {
GetTextExtentPoint32(hdc,p,lstrlen(p),size); GetTextExtentPoint32(hdc,p,lstrlen(p),size);
if(size->cx > longest) if(size->cx > longest)
{ {
longest=size->cx; longest=size->cx;
} }
p = generic_strtok(TEXT('\0'), TEXT("\n")); TCHAR temptext2[2];
} temptext2[0] = TEXT('\0');
p = wcstok(temptext2, TEXT("\n"));
}
return longest; return longest;
} }