Unicode Controls & Classes for VB6 - Version 4

clsFontHDC.SetFontToDC Method

Create a font object and assign it to the specified Device Context

Syntax
Public Sub SetFontToDC (ByVal lHdc As Long, _
ByRef sFontName As String, _
ByRef iFontSize As Integer, _
Optional ByVal lForeColor As Long = -1&, _
Optional ByVal bFontBold As Boolean = False, _
Optional ByVal bFontItalic As Boolean = False, _
Optional ByVal bFontUnderline As Boolean = False, _
Optional ByVal bFontStrikeout As Boolean = False, _
Optional ByVal iQualityType As eFontHDCQualityType = efhat_default, _
Optional ByVal iCharWeightInc As Integer = 0, _
Optional ByVal bForce96DPI As Boolean = False)
Parameters
Parameter Description
ByVal lHdc As Long Destination DC
ByRef sFontName As String FontName
ByRef iFontSize As Integer Size of font in points
Optional ByVal lForeColor As Long = -1& Text Color
Optional ByVal bFontBold As Boolean = False Bold
Optional ByVal bFontItalic As Boolean = False Italic
Optional ByVal bFontUnderline As Boolean = False Underline
Optional ByVal bFontStrikeout As Boolean = False Strikeout
Optional ByVal iQualityType As eFontHDCQualityType = efhat_default Font quality type
Optional ByVal iCharWeightInc As Integer = 0 The type of bold (-2..+2)
Optional ByVal bForce96DPI As Boolean = False Forces to create the font using 96dpi as reference (also if the system is using a different DPI unit)
Remarks