views:

163

answers:

1

We have a class that derives from CFileDialog that overrides the OnTypeChange() method to allow it to change the filename to keep it in synch with the selected extension whenever the user selects a new extension from the filter combobox. (Our filters are set to contain only one extension per filter entry.) Unfortunately, the way we are doing this seems to have been broken by the Vista style dialogue. (We were using SetControlText() to set the filename edit box to the filename with the newly selected extension, but the control ID seems to be different for the Vista style dialogue, and the one that I found using Spy++ works just as well as the old ID (i.e., it doesn't)..)

Is there a better way to tell the CFileDialog object to update the filename field to use the new extension when the user selects a new filter? It has to work with the old XP style dialogue as well.

Failing that, how to I force the use of the XP style dialogue so that I get my functionality back without the dialogue crashing on me? (I'd rather not go that route if at all possible.) I've found a way to get it to fall back to the XP style. I still want to get the new style dialogue to do what I want though.

A: 

I have a nearly identical problem.

Chris
That doesn't really answer my question. (I can see by your rep, though, that you're unable to leave comments yet, so I guess you can be excused for leaving an answer that should be a comment.
RobH