GaryFrost Posted February 14, 2005 Share Posted February 14, 2005 Been trying to get a column count, not sure what I'm doing wrong here but any help would be greatly appreciated. Func _GUICtrlGetListViewColsCount(ByRef $lv) Local $LVM_FIRST=0x1000 Local $HDM_FIRST=0x1200 Local $LVM_GETHEADER=($LVM_FIRST + 31) Local $HDM_GETITEMCOUNT=($HDM_FIRST + 0) Local $hdr $hdr = GUICtrlSendMsg($lv,$LVM_GETHEADER,0,0) return GUICtrlSendMsg($hdr,$HDM_GETITEMCOUNT,0,0); EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
bshoenhair Posted February 14, 2005 Share Posted February 14, 2005 See ControlListView in the help file. "GetSubItemCount" - Returns the number of subitems. Link to comment Share on other sites More sharing options...
GaryFrost Posted February 14, 2005 Author Share Posted February 14, 2005 (edited) Thanks, forgot all about the regular control calls, makes life a little easierexpandcollapse popup;=============================================================================== ; ; Function Name: _GUICtrlGetListViewColsCount() ; Description: Return the number of columns for a listview ; ; Parameter(s): $lv - ListView control ; $title - Windows title ; $text - Window text ; ; Requirement(s): None ; Return Value(s): Number of columns ; ; Author(s): Gary Frost ; ;=============================================================================== Func _GUICtrlGetListViewColsCount(ByRef $lv,$title="",$text="") If(StringLen($title)==0) Then $title = WinGetTitle("") EndIf Return ControlListView($title ,$text, $lv, "GetSubItemCount") EndFunc ;=============================================================================== ; ; Function Name: _GUICtrlGetListViewItemsCount() ; Description: Return the number of columns for a listview ; ; Parameter(s): $lv - ListView control ; $title - Windows title ; $text - Window text ; ; Requirement(s): None ; Return Value(s): Number rows ; ; Author(s): Gary Frost ; ;=============================================================================== Func _GUICtrlGetListViewItemsCount(ByRef $lv,$title="",$text="") If(StringLen($title)==0) Then $title = WinGetTitle("") EndIf Return ControlListView($title ,$text, $lv, "GetItemCount") EndFuncSee ControlListView in the help file."GetSubItemCount" - Returns the number of subitems.<{POST_SNAPBACK}> Edited November 1, 2007 by GaryFrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now