객체라함은 라벨, 텍스트박스, 리스트박스, 콤보박스 등 문자열이 사용되는 객체를 말합니다.
폰트변경은 HFont 구조체를 사용하여 SendMessage로 변경하는 방법입니다.
폰트변경은 HFont 구조체를 사용하여 SendMessage로 변경하는 방법입니다.
HFont 구조는 다음과 같습니다.
CPP
HFONT CreateFont(
int nHeight, // logical height of font
int nWidth, // logical average character width
int nEscapement, // angle of escapement
int nOrientation, // base-line orientation angle
int fnWeight, // font weight
DWORD fdwItalic, // italic attribute flag
DWORD fdwUnderline, // underline attribute flag
DWORD fdwStrikeOut, // strikeout attribute flag
DWORD fdwCharSet, // character set identifier
DWORD fdwOutputPrecision, // output precision
DWORD fdwClipPrecision, // clipping precision
DWORD fdwQuality, // output quality
DWORD fdwPitchAndFamily, // pitch and family
LPCTSTR lpszFace // pointer to typeface name string
);
사용방법은 다음과 같습니다.
CPP
HFONT hNewFont;
hNewFont=CreateFont( 12,0,0,0,0,0,0,0,HANGEUL_CHARSET,3,2,1,
VARIABLE_PITCH | FF_MODERN,"돋음");
m_hList.SendMessage( WM_SETFONT, (WPARAM)hNewFont, (LPARAM)TRUE);