Hi everyone,
I am trying to change the default font size of a richedit control by sending a EM_SETCHARFORMAT message and filling a CHARFORMAT structure, like in Izillieons tutorial. However, the size isn't working. Here is my formula to calculate the size of the font in twips:

DefaultText.yHeight = -fontsize * 1440 / GetDeviceCaps(hDC, LOGPIXELSX);

But this doesn't work. When I multiply the fontsize by roughly 2 it works (but becomes less accurate as fontsize gets bigger). What should I do? Thanks.
Posted on 2004-11-07 11:42:17 by StefanD