NO

Author Topic: Setting the common dialog's path from hook function  (Read 3044 times)

CLR

  • Guest
Setting the common dialog's path from hook function
« on: January 31, 2013, 12:23:06 AM »
Hello.

I want to set the common dialog's path from within hook function.
I found this: http://computer-programming-forum.com/74-vb-winapi/376edc27d65dd36d.htm (see response by Don Bradne)

Code: [Select]
SendMessage GetParent(hWnd), CDM_SETCONTROLTEXT, ID_FILETEXT, ByVal "C:\Program Files"
SendMessage GetDlgItem(GetParent(hWnd), ID_OPEN), WM_LBUTTONDOWN, 0&, ByVal 0&
SendMessage GetDlgItem(GetParent(hWnd), ID_OPEN), WM_LBUTTONUP, 0&, ByVal 0&
SendMessage GetParent(hWnd), CDM_SETCONTROLTEXT, ID_FILETEXT, ByVal ""

I've tried and it works. However, it looks a bit strange. I wonder if there's a better way of doing this.

Tino

  • Guest
Re: Setting the common dialog's path from hook function
« Reply #1 on: February 05, 2013, 06:40:00 AM »
Hi  :)

I m not sure if its about Hook s or File Dialogs,
maybe the attached project helps you.

( had to reupload since it was part of old forum i think )


CLR

  • Guest
Re: Setting the common dialog's path from hook function
« Reply #2 on: March 12, 2013, 03:53:20 PM »
The attachment contains a project using the technique above.