S
SammyB
I am trying to get back to the way Office 97 allowed multiselect in
GetOpenFileName: the order you selected was the order returned. This means
that I must keep my own list of files which changes whenever the user changes
the selection. I started with Dev Ashish's code for the GetOpenFilename
API, http://www.mvps.org/access/api/api0056.htm. In the hook proc whenever I
get a CDN_SELCHANGE notification, I send a CDM_GETSPEC msg to the parent to
get the current list of files. The first one in the list seems to be the
most recently selected, so I can construct an ordered list as long as the
user ctrl-clicks.
The problem is when the user shift-clicks. In order to construct a list, I
need to get the complete list of files for the current directory which is in
the listbox and also get it in the order that it is in the listbox. I have
tried to send the listbox a WM_GETTEXT message, but I do not get a response:
probably I have the wrong hWnd. I am getting the hWnd with
hWndList = FindWindowEx(hWndParent, 0, "SHELLDLL_DefView", vbNullChar)
How should I get the handle and/or the list?
Note, I get the directory name whenever the user changes it via the
CDN_FOLDERCHANGE notification and the CDM_GETFOLDERPATH msg, but I cannot
just use dir to get the file list, because it may be in the wrong order. I
have to get it from the dialog's listbox.
TIA --Sam
GetOpenFileName: the order you selected was the order returned. This means
that I must keep my own list of files which changes whenever the user changes
the selection. I started with Dev Ashish's code for the GetOpenFilename
API, http://www.mvps.org/access/api/api0056.htm. In the hook proc whenever I
get a CDN_SELCHANGE notification, I send a CDM_GETSPEC msg to the parent to
get the current list of files. The first one in the list seems to be the
most recently selected, so I can construct an ordered list as long as the
user ctrl-clicks.
The problem is when the user shift-clicks. In order to construct a list, I
need to get the complete list of files for the current directory which is in
the listbox and also get it in the order that it is in the listbox. I have
tried to send the listbox a WM_GETTEXT message, but I do not get a response:
probably I have the wrong hWnd. I am getting the hWnd with
hWndList = FindWindowEx(hWndParent, 0, "SHELLDLL_DefView", vbNullChar)
How should I get the handle and/or the list?
Note, I get the directory name whenever the user changes it via the
CDN_FOLDERCHANGE notification and the CDM_GETFOLDERPATH msg, but I cannot
just use dir to get the file list, because it may be in the wrong order. I
have to get it from the dialog's listbox.
TIA --Sam