public SetFont ( string fontname, float fontsize ) : void | ||
fontname | string | |
fontsize | float | |
Résultat | void |
public void SetFont(string fontname, float fontsize)
{
var tFont = new LogFont
{
lfItalic = 0,
lfStrikeOut = 0,
lfUnderline = 0,
lfWeight = 400,
lfWidth = 0,
lfHeight = ((int) (-fontsize*1.3333333333333)),
lfCharSet = 1,
lfPitchAndFamily = (FIXED_PITCH | FF_MODERN),
lfFaceName = fontname
};
LogFont lf = tFont;
NativeMethods.SendMessage(hIMEWnd, (int) WindowMessage.WM_IME_CONTROL, IMC_SETCOMPOSITIONFONT, lf);
}
IMEWindow::SetFont ( Font font ) : void |