S
Scott Gunn
Hi, I'm trying to find out what order the columns in a listview have been
reordered into.
I found some examples on the Internet that use csharp and I tried to convert
them into vb but it always returns false and pCol is empty
Where am I going wrong?
[Declares]
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal
hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef
lParam As LV_COLUMN) As Integer
Public Structure LV_COLUMN
Dim mask As UInt32
Dim fmt As Integer
Dim cx As Integer
Dim pszText As String
Dim cchTextMax As Integer
Dim iSubItem As Integer
Dim iImage As Integer
Dim iOrder As Integer
End Structure
Public Const LVM_FIRST = &H1000
Public Const LVM_GETCOLUMN = (LVM_FIRST + 25)
[ Code to get the column info for column 0]
Call SendMessage(lvListView.Handle.ToInt32, LVM_GETCOLUMN, 0, pCol)
Regards
Scott.
reordered into.
I found some examples on the Internet that use csharp and I tried to convert
them into vb but it always returns false and pCol is empty
Where am I going wrong?
[Declares]
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal
hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef
lParam As LV_COLUMN) As Integer
Public Structure LV_COLUMN
Dim mask As UInt32
Dim fmt As Integer
Dim cx As Integer
Dim pszText As String
Dim cchTextMax As Integer
Dim iSubItem As Integer
Dim iImage As Integer
Dim iOrder As Integer
End Structure
Public Const LVM_FIRST = &H1000
Public Const LVM_GETCOLUMN = (LVM_FIRST + 25)
[ Code to get the column info for column 0]
Call SendMessage(lvListView.Handle.ToInt32, LVM_GETCOLUMN, 0, pCol)
Regards
Scott.