본문 바로가기
다물칸 주소복사
조회 수 3189 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
구분 팁&트릭

객체라함은 라벨, 텍스트박스, 리스트박스, 콤보박스 등 문자열이 사용되는 객체를 말합니다. 

폰트변경은 HFont 구조체를 사용하여 SendMessage로 변경하는 방법입니다. 


HFont 구조는 다음과 같습니다.

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
);


사용방법은 다음과 같습니다.

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);