LIstview header height

Started by Elias Montoya, July 27, 2010, 03:19:54 PM

Previous topic - Next topic

Elias Montoya


Is there an easy way to adjust the header of a listview to the size of the font?
I tried an example that works in the PB source code forums, but i wasnt able to port it
to Firefly.
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Elias Montoya

#1
Nevermind, i got it.

Correction... i got the header height correct, but when scrolling horizontally is a mess...
this is the code i added, in the CREATE for the form add this:

Global lpOldWndProc2 As Long
lpOldWndProc2 = SetWindowLong(GetWindow(HWND_LITERATURA_LISTVIEW1, %GW_CHILD),%GWL_WNDPROC,ByVal CodePtr(ListviewHeaderProc))
SendMessage GetWindow(HWND_LITERATURA_LISTVIEW1, %GW_CHILD), %WM_SIZE, 0, 0

And add the listview header procedure:

Function HeaderProc(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    Select Case wMsg
        Case %WM_SIZE : FF_Control_SetSize(hWnd, 700, 60)
    End Select
    Function = CallWindowProc( lpOldWndProc2, hWnd, wMsg, wParam, lParam)
End Function


How to correct the Scrolling mess?? :P
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.