#### Archived

This topic is now archived and is closed to further replies.

# Cant get the GetCharWidth32 work. (not becose the args)

This topic is 5041 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

What should I do to get GetCharWidth32 working since it returns 0 and last error is: 120 This function is not supported on this system. ERROR_CALL_NOT_IMPLEMENTED ? Im running win98 SE so it should be suported? also GetCharWidthFloat fails but GetCharWidth works! Oh and I have windows.h included and no stdafx.h stuff. I also have some directX includes...

##### Share on other sites
Those functions are prob. available in the win2k distros or windows NT or something. Perhaps it''s new stuff implemented in the windows api...

##### Share on other sites
Allright thank you thec.

fortunetly at least GetCharWidth works, I just dont know how inaccurate it is exactly.
It returns logical coordinates wich I should convert to pixels how exactly?
this is what I''ve tryed but it isnt accurate for all font widths
and types...

// get a''s width as exampleMulDiv(''a'',GetDeviceCaps(hdc,LOGPIXELSX))

##### Share on other sites
Just needed to say that I counted character width scale and mulplied MulDiv''s result whit it.

So maybe it works now.

##### Share on other sites
or maybe not. Seriously how do you convert ''logical coordinates'' to normal pixel coordinates?