Link to home
Start Free TrialLog in
Avatar of nrok829384
nrok829384

asked on

Common Dialog Control

How Do I change the button names on a dialog control?  I want to copy a file from 1 directory to another one.   It's only coping a file and I don't want it to say save because the user might be confused.  If there is any code or API routine that would be greatly helpfull.  Thanks

Jen
Avatar of polaughlin
polaughlin

I don't think that it is possible to do that without making your own "Common dialog" form (a form in your project that looks and works exactly like the common dialog, but says "Copy" instead of "Save") which can be a whole lot of work.  I'm not 100% sure, so I could be wrong.  If I am, someone please correct me and post it here so I can know how to do it also. :P
that's totally true. the best thing you can do is to make your own dialog box.

may be you could use the FileListbox, drivelistbox, dirlistbox.

but i will look old-fashioned.
If you're game you could use some subclassing to look up the hWnd and hDC of the window, then find the hWnd and such of the Save button, then change it - it is possible - but is it really worth it.

PS. don't ask me - I've only heard of it being done, I've tried but can't do it myself
I've seen enough code to know that it is possible and fairly easy, but unfortunately, I can't find it. The hardest part is establishing the hook that will notify your app when the dialog is created. Once you know that, it's almost child's play to find the button (FindWindow or a GetWindow loop) and change it's caption (SetWindowText).

Sorry I couldn't be more help!
Goto  www.vbaccelerator.com

they got a lot of stuff on common dialogs - it may be of help
ASKER CERTIFIED SOLUTION
Avatar of cvidler
cvidler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial