ListView_GetColumnCount FF V2.99

Started by Ian Bayly, July 28, 2009, 02:53:13 AM

Previous topic - Next topic

Ian Bayly

I copied some code developed in prior FF version into a new project and got the 519 Missing declaration when compiling in FF V2.99.
I also note that GetColumnCount is not in the Functions list of V2.99.
This may be something I have introduced because the original code compiles fine in FF2.99!!

Any ideas out there?

Here is code snip
~~~~~~~~
'   TIDY UP LV
FF_ListView_DeleteAllItems HWND_FRMMAINTAINPRICES_lvPrices
lCol = ListView_GetColumnCount(HWND_FRMMAINTAINPRICES_lvPrices)<<<<< ERRORS HERE
For lCol = 1 To lCol
   FF_ListView_DeleteColumn (HWND_FRMMAINTAINPRICES_lvPrices, 0)
Next lCol
~~~~~~~~~~

Jean-Pierre LEROY

#1
Hello Ian,

Currently there is no FireFly function to count the number of columns of a ListView; could be useful to add a FF_ListView_GetColumnCount() function in FF? what do you think Paul?

In the meantime I think that you have to include the code below in your program.


'-----------------------------------------------------------------------
Function ListView_GetColumnCount( ByVal hWndListView As Dword ) As Dword
'-----------------------------------------------------------------------
   
   Local hWndLVHdr As Dword
   '// get the header control
   hWndLVHdr = SendMessage( hWndListView, %LVM_GETHEADER, 0, 0 )
   '// return the number of items in it - ie. the number of columns
   Function = SendMessage( hWndLVHdr, %HDM_GETITEMCOUNT, 0, 0 )
   
End Function


I stole this code from this thread  :)

http://planetsquires.com/support/index.php?topic=2212.0

Hope this helps
Jean-Pierre

Ian Bayly

Thanks Jean-Pierre.
It was very careless of me not to notice that, and I have no excuses to offer!

Maybe I can get off the hook by saying FireFly is so feature rich that it never occurred to me that it wasn't a built in function.
:-[

Ian B