>> So the listbox in the dialog ...
> <snip>
[quoted text clipped - 5 lines]
> appear you're using that langauge. So, best suggestion would be to google
> "CDN_SELCHANGE" and see how that's typically handled in your language of choice.
> can you suggest a more appropriate group where i might re-post this
> question?
> (as i wrote: if there is one, please advise.)
microsoft.public.platformsdk.*, most likely
microsoft.public.platformsdk.base.

Signature
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team
iCode Systems
MBB - 29 May 2008 18:46 GMT
>> can you suggest a more appropriate group where i might re-post this
>> question?
>> (as i wrote: if there is one, please advise.)
>
> microsoft.public.platformsdk.*, most likely
> microsoft.public.platformsdk.base.
thanks for the recommendation.
>>> So the listbox in the dialog ...
>> <snip>
[quoted text clipped - 9 lines]
> the MSDN article that discusses the CDN_SELCHANGE notification refers to the
> control as a list box, as do other articles.
Perhaps.
> yes, i am familiar with Spy++. so what's your point?
That using it would show the user is interacting with a listview. I'm not aware of
the hidden listbox mentioned by Scott, nor did I need to be to deal with the
CDN_SELCHANGE notification.
> how do you know what language i am using?
I don't. I just had a pretty good idea it wasn't ClassicVB. Is it?
> i stated clearly in my message that this is an api question.
Yep.
> isn't winapi part of this group's name?
Yep.
> if i write a VB Classic app that tries to do the same thing and fails in the
> same way, will you take a less antagonistic approach?
No, I'd offer you the code I use. To be precise, in OFNHookProc...
Select Case uMsg
Case WM_NOTIFY
' The OFNOTIFY struct is passed in the lParam of this message.
Call CopyMemory(ofn, ByVal lParam, Len(ofn))
' A pointer to an OPENFILENAME structure is passed in OFNOTIFY.
Call CopyMemory(opfile, ByVal ofn.lpOFN, Len(opfile))
' Branch based on notification code.
Select Case ofn.hdr.code
Case CDN_FILEOK
' This is our chance to say whether the file selection is valid.
Case CDN_FOLDERCHANGE
'Debug.Print "CDN_FOLDERCHANGE"
Case CDN_SELCHANGE
' Find handle to dialog window.
hWnd = GetParent(hDlg)
' Get size of buffer required for filespec.
nChars = SendMessage(hWnd, CDM_GETSPEC, 0&, ByVal m_FileEx)
' Get the full buffer for the filespec(s)
If nChars > 0 Then
m_FileEx = Space$(nChars)
Call SendMessage(hWnd, CDM_GETSPEC, nChars, ByVal m_FileEx)
End If
' Get size of buffer required for path.
nChars = SendMessage(hWnd, CDM_GETFOLDERPATH, 0&, ByVal m_FolderEx)
' Get the full buffer for the path.
If nChars > 0 Then
m_FolderEx = Space$(nChars)
Call SendMessage(hWnd, CDM_GETFOLDERPATH, nChars, ByVal
m_FolderEx)
End If
End Select
End Select
It's probably a little non-standard, but it does the job for me. I stash the file
and folder strings in persisted (module-scope) variables, to be acted upon when the
dialog is dismissed.
> i goggled extensively BEFORE posting.
> can you suggest a more appropriate group where i might re-post this question?
> (as i wrote: if there is one, please advise.)
Looks like you got a couple of other suggestions. I'm not saying this group is
INappropriate, either, fwiw.
> congratulations!
> you have just provided the most unhelpful MS news group reply i have EVER
> received.
Kewl. :-)
> what is accomplished by being so snarky?
Sorry, I thought I had given you the info you needed. I misunderestimated,
apparently.

Signature
.NET: It's About Trust!
http://vfred.mvps.org