' 将OLE StdFont字体结构转换到API的LOGFONT字体结构 With tLF sFont = myfont.Name temp = StrConv(sFont, VBFromUnicode) For iChar = 1 To Len(sFont) .lfFaceName(iChar - 1) = temp(iChar - 1) Next iChar .lfItalic = myfont.Italic .lfWeight = IIf(myfont.Bold, FW_BOLD, FW_NORMAL) .lfWidth = fontwidth .lfHeight = fontheight .lfUnderline = fontunderline .lfStrikeOut = fontStrikethrough .lfCharSet = myfont.Charset End WithhFnt = CreateFontIndirect(tLF)' 转换LOGFONT结构到字体句柄