首页  编辑  

用API更换控件的字体

Tags: /超级猛料/API.Windows应用程序接口/窗口和控件相关/   Date Created:
var hControlFont: HFONT;
begin
     hControlFont := CreateFont(14, 8, 0, 0, FW_NORMAL, 0, 0, 0,
ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH Or FF_DECORATIVE, 'Courier New');
     SendMessage(handle, WM_SETFONT, hControlFont, 1);
end;