I'm trying to make small, superscript characters in a rich edit control, but I'm having problems. I cannot get the font small enough. Basically I can put any value for yHeight, but it doesn't do anything unless the value is quite large, in which case it makes the font huge. Here is my code:
Code:
CHARFORMAT cfFormat;
cfFormat.dwMask=CFM_OFFSET|CFM_SIZE;
cfFormat.cbSize=sizeof(CHARFORMAT);
cfFormat.yOffset=100;
cfFormat.yHeight=1;
SendMessage(hwnd,EM_SETCHARFORMAT,(WPARAM)SCF_SELECTION,(LPARAM)&cfFormat);
Are there any problems with that code?