|
|
|
re: Question about 'Customize Common Dialogs'
Saturday, April 9, 2005 at 6:56 pm Windows XP Annoyances Discussion Forum
Posted by Luke Hudson
(2 messages posted)
On Tuesday, April 5, 2005 at 6:07 am, Falcon wrote:
>Out of curiousity, how have you done it? (Get as technical as you wish, I'm a programmer
>as well)
My program is written in C using the Win32 API, so no
Microsoft class libraries.
I use C because there are some good free C compiler/IDEs and I haven't found the
C++ ones as easy to use.
I used the Win32 API SetWindowsHookEx to set up a
WH_CBT hook which watches for opening windows.
When a window opens I check the title and window styles in order to determine whether
it is an Open/Save dialog box. If it is (or rather, if my program THINKS it is),
then I subclass the window procedure.
In my subclassed window proc. I set a timer for a short duration, then pass control
back to the original dialog proc. This allows the dialog to initialize itself, as
I discovered that setting things immediately did not work. I then send the dialog
appropriate messages to set up things the way we want them.
Anyway, I hope that helps.
Feel free to ask more questions.
|
All messages in this thread [show all]
 |  |  |  |  | re: Question about 'Customize Common Dialogs' (Luke Hudson: Sat, Apr 9, 2005, 6:56 pm) |
| |
| |
Return to the Windows XP Discussion Forum
|
|
|
|