The GetTextExtent function has been deleted. Win32 applications should use the GetTextExtentPoint function.
GetTextExtentPoint