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

Started by
4 comments, last by Craazer 20 years ago
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...
Advertisement
Those functions are prob. available in the win2k distros or windows NT or something. Perhaps it''s new stuff implemented in the windows api...
-------------------------------------------http://www.thec.org
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_5cz6.asp.

Yeah, I was right, it''s unsupported in 95/98. Work around it.

Albert
-------------------------------------------http://www.thec.org
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))
Just needed to say that I counted character width scale and mulplied MulDiv''s result whit it.

So maybe it works now.
or maybe not. Seriously how do you convert ''logical coordinates'' to normal pixel coordinates?

This topic is closed to new replies.

Advertisement