コード例 #1
0
ファイル: AboutDlg.cpp プロジェクト: jpix/renameit
VOID CAboutDlg::OnWindowPosChanged(WINDOWPOS* lpwndpos)
{
	CDialog::OnWindowPosChanged(lpwndpos);

	// TODO: Add your message handler code here
	UINT nFontSize = 21;
	SetCtrlFont(IDC_STATIC_TITLE,nFontSize);

	

}
コード例 #2
0
/*!	フォントラベルにフォントとフォント名設定する
	@date 2013.04.24 Uchi
*/
HFONT CPropCommon::SetFontLabel( HWND hwndDlg, int idc_static, const LOGFONT& lf, int nps )
{
	HFONT	hFont;
	TCHAR	szFontName[80];
	LOGFONT lfTemp;
	lfTemp = lf;
	// 大きすぎるフォントは小さく表示
	if( lfTemp.lfHeight < -16 ){
		lfTemp.lfHeight = -16;
	}

	hFont = SetCtrlFont( hwndDlg, idc_static, lfTemp );

	// フォント名の設定
	auto_sprintf( szFontName, nps % 10 ? _T("%s(%.1fpt)") : _T("%s(%.0fpt)"),
		lf.lfFaceName, double(nps)/10 );
	::DlgItem_SetText( hwndDlg, idc_static, szFontName );

	return hFont;
}