Controlling a ListView
Posted: 27 Oct 2006, 16:01
Hi TiKu,
it's me again with some problem. I thought, maybe you, as a crack and expert in working with ListView, are the right guy to address.
I'm currently messin' with the CommonDialog control in VB. I wanted it to start in Details mode and now I want it to sort the files in order of date.
I managed the first like that:
I find the window handle of the CommonDialog, get the handle of the ShellDLL_DefView window and send it a message to set the view style to what I want (details). That works great already.
Now I know I'd have to click on the column header #4 to obtain the sorting by date.
Also I found out how I can get window handles of the SysHeader32 which I think are the column headers and of the SysListView32 window.
What I want to know: can I use SendMessage to click on the column header? What message do I have to use? How do I select column 4 and click on it? Or maybe there is even a WM_SORTTHISLISTLIKEIWANTIT message I can send to the ListView.
I thought, maybe you are the right one to ask here.
Best regards
WoF
it's me again with some problem. I thought, maybe you, as a crack and expert in working with ListView, are the right guy to address.
I'm currently messin' with the CommonDialog control in VB. I wanted it to start in Details mode and now I want it to sort the files in order of date.
I managed the first like that:
I find the window handle of the CommonDialog, get the handle of the ShellDLL_DefView window and send it a message to set the view style to what I want (details). That works great already.
Now I know I'd have to click on the column header #4 to obtain the sorting by date.
Also I found out how I can get window handles of the SysHeader32 which I think are the column headers and of the SysListView32 window.
What I want to know: can I use SendMessage to click on the column header? What message do I have to use? How do I select column 4 and click on it? Or maybe there is even a WM_SORTTHISLISTLIKEIWANTIT message I can send to the ListView.
I thought, maybe you are the right one to ask here.
Best regards
WoF