Archived

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

Craazer

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

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 this post


Link to post
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 this post


Link to post
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 example

MulDiv(''a'',GetDeviceCaps(hdc,LOGPIXELSX))

Share this post


Link to post
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 this post


Link to post
Share on other sites