End Google Ads 201810 - BS.net 01 --> I need to find out the width and height (in pixel/ in any logical unit) of a string.

I am using GetTextExtentPoint32() API to calculate the string size. But it is observed that the GetTextExtentPoint32() is giving me the different size , if execute my application on different ******** OS. After some analysis it is observed that font size and font face value is affecting the size of a string, so i have set the font face and font size to the DC.But still due to different CHARSET value available on different ******** OS i am getting different size of a string. Please let me know how to handle this issue, so that i can get same value of a string (string from any ********) for different ******** OS.
I wrote the method as below:
LPSIZE lpSize = new SIZE () ;

void MyAPI( CString szLangStr , lpSize )
{
....
}


So the expected out put the width and height of szLangStr and which should be same for all the ******** OS.