Last Updated 2005/02/16
Programming Tips Windows フォント  索 引 
フォント作成
2005/02/16

フォントを作成するのに,CreateFont() より CreateFontIndirect() を使用した方が簡単である.
(CreateFont() は引数が多い)

    PLOGFONT pFont;
    HFONT    hFont;
    pFont = (PLOGFONT)LocalAlloc(GPTR, sizeof(LOGFONT));
    memset(pFont, 0, sizeof(LOGFONT));
    pFont->lfCharSet = SHIFTJIS_CHARSET;
    pFont->lfHeight = -20;
    hFont = CreateFontIndirect(pFont);


参照
前後のTips
フォント作成

DSS ProgrammingTipsCGI Ver2.02