Hi,
... about setting style of items:
I see you can set style by setting the $iFontStyle in function calls as following:
; $iFontStyle - Text style of item or subitem
; Use the following values for $iFontStyle
; 0: Normal text style (default)
; 1: Bold text style
; 2: Italic text style
; 3: Underline text style
; These predefined constants can also be used:
; $iFontStyleNormal, $iFontStyleBold, $iFontStyleItalic, $iFontStyleUnderline
; If $sFontName is a font handle $iFontStyle is ignored
If allowed I would propose this:
Instead of using values 1 or 2 or 3 for bold or italic or underline respectively, It could be used 1, 2 , 4 (bit values) allowing in this way the use of more styles for a single item just summing values together,
so, for example bold AND underline become 5 (that is 1 + 4)
with a quick test, I've seen that it works by just changing this part in the UDF
Switch $iFontStyle
Case 0 ; Normal
Case 1 ; Bold
DllStructSetData( $tLogFont, "Weight", BitOR( $iWeight, $FW_BOLD ) )
Case 2 ; Italic
DllStructSetData( $tLogFont, "Italic", True )
Case 3 ; Underline
DllStructSetData( $tLogFont, "Underline", True )
Case Else
If $sFontName Then DllStructSetData( $tLogFont, "FaceName", $sFaceName ) ; Reset $tLogFont on error
Return SetError(5, 0, -1) ; Invalid font style
EndSwitch
with something like this for example:
If BitAND($iFontStyle,1) Then DllStructSetData( $tLogFont, "Weight", BitOR( $iWeight, $FW_BOLD ) ) ; Bold
If BitAND($iFontStyle,2) Then DllStructSetData( $tLogFont, "Italic", True ) ; Italic
If BitAND($iFontStyle,4) Then DllStructSetData( $tLogFont, "Underline", True ) ; Underline
if instead I have misunderstood how to use styles, then just forget all of what i've said above...
Thanks