GDI创建旋转HFONT

//参数: bRight--向右旋转90度 nFontHeight字体高度 bFontWidth字体宽度
HFONT CreateRotateFont(bool bRight,int nFontHeight,int nFontWidth)
{
    LOGFONT   lf={0}; 
    lf.lfCharSet   =   GB2312_CHARSET; 
    strcpy(lf.lfFaceName,"宋体"); 
    lf.lfEscapement   =   bRight?-900:900; 
    lf.lfWeight   =   FW_BOLD;//FW_NORMAL; 
    lf.lfHeight   =   (~nFontHeight)+1; 
    lf.lfWidth   =   nFontWidth; 
    return CreateFontIndirectA(&lf);
}


你可能感兴趣的:(GDI创建旋转HFONT)