Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compile Exe
#Dim All
%Unicode=1
#Include "win32api.inc"
%IDC_ListView = 500
Global hDlg,hFont,hFontB,hListView,hHeader As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "ListView Header Font",300,300,245,95,%WS_OverlappedWindow To hDlg
Control Add ListView, hDlg, %IDC_ListVIew, "", 10,10,175,75 '225
Control Handle hDlg, %IDC_ListView To hListView
ListView Insert Column hDlg, %IDC_ListVIew, 1, "Col1", 75, 0
ListView Insert Column hDlg, %IDC_ListVIew, 2, "Col2", 75, 0
ListView Insert Item hDlg, %IDC_ListVIew, 1, 1, "one" 'row 1, col1
ListView Set Text hDlg, %IDC_ListVIew, 1,2, "two" 'row1 col2
Font New "Mistral",14,0 To hFont
Control Set Font hDlg, %IDC_Listview, hFont
Font New "Tahoma",12,1 To hFontB
hHeader = ListView_Getheader(hListView)
SendMessage hHeader, %WM_SetFont, hFontB, %True
Dialog Show Modal hDlg
End Function
http://www.garybeene.com/sw/gbsnippets.htm