'Change size and weight
lFontData.lfWeight = FW_NORMAL
lFontData.lfHeight = -MulDiv(8, GetDeviceCaps(hWinDC, LOGPIXELSX), 72
' Change to MS Sans Serif
' FontName has to be stored in a byte array
sFontName = "MS Sans Serif"
For lRet = 1 To Len(sFontName)
lFontData.lfFaceName(lRet) = Asc(Mid$(sFontName, lRet, 1))
Next
lFontData.lfFaceName(Len(sFontName) + 1) = 0
' Create the new Font and then set it to hWinDC
lNewFont = CreateFontIndirect(lFontData)
lFont = SelectObject(hWinDC, lNewFont)
' After you finish with it
' Restore the old font
SelectObject hWinDC, lFont
' Delete the font we made
DeleteObject lNewFont