'listview column count
'   在列表视图中返回多少列数。
'   hWndControl:  控件的句柄 (例如  HWND_FORM1_LISTVIEW1)
Function FF_ListView_GetColumnCount( ByVal hWndControl As HWND ) As Long
   
   Dim hWndLVHdr as HWnd 
   '// get the header control
   hWndLVHdr = Cast(HWnd, SendMessage( hWndControl, LVM_GETHEADER, 0, 0 ))
   '// return the number of items in the header (ie. the number of columns).
   Function = SendMessage( hWndLVHdr, HDM_GETITEMCOUNT, 0, 0 )
   
End Function
