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.
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