I've been searching for days on this, and find bits and pieces of how-to's but I can't seem to fit them all together. Maybe someone there can give me the straight story.
I want to display ye old CommonDialog comdlg32.ocx with the files being shown in the "detail" view. I understand I have to create some kind of "hook" to do this. Is it a combination of using the GetOpenFileName call and perhaps some other call like GetDlgItem?
You don't have to give me all the code. Just tell me what to do/call and in what order with maybe a little explanation as to what it's going to do.
I found this very question posted in many a Google Group post. All the answers mostly described it as being impractical in VB, and the little code I found was incomplete.
That was so easy. You could make money answering all those Google people. There must have been 20 posts I read that had no answers. And so simple. Can I ask you a couple of questions?
Why do you need the timer event?
And you're using the API rather than a timer control because..?
The FindWindow function: finds a window by its window title?
How is PostMessage different from SendMessage?
What the heck is 40964?
Where (in MSDN? or even API text viewer) can you find *English Language* definitions for those constants, such as the &H111 that you set for WM_COMMAND?
Lots of questions, any answers? Thank you again. Yay Shawn. Only in NY we would say Yeah Shawn, cause it's more like Shea. Lets go Mets. (yeah, right) (that's yeah not like yay)
Why do you need the timer event?
You'll notice that when you show the dialog box, your program is locked. It can't do anything until the dialog box is closed. We change the view on the dialog AFTER it is shown, and when's the only time we can do that? While it's shown.
And you're using the API rather than a timer control because..?
The dialog box will also freeze the intrinsic timer.
The FindWindow function: finds a window by its window title?
Right, that's how we get a handle to the dialog box. After that we can do whatever need to.
How is PostMessage different from SendMessage?
PostMessage is kind of like a submissive version of SendMessage. The window has a list of messages to process and with PostMessage we stack the message to the list in the end. SendMessage is an impatient bastard and cuts to the front of the line.
What the heck is 40964?
40964 is the ID of the "Details" menu. Normally, this is a dynamic value but luckily in this case it's static.
Where (in MSDN? or even API text viewer) can you find *English Language* definitions for those constants, such as the &H111 that you set for WM_COMMAND?
COMMAND does a couple of things. Here, it tells the main window that the menu with the ID of "40964" has been clicked which in turn shows details. AllAPI.Net has an API View and an API Guide. Both'll help you out.
Glad I could help. Feel free to ask whatever else.