G
Guest
When I set a Filter on my SaveFileDialog, the dialog box comes up correctly. However, if I change value of the "Save As Type" drop-down, all files and directories are removed from the dialog box, even those that match the specification. The main part of the dialog box where files and directories are normally displayed is just an empty white rectangle. The only way to get file names back is to type in a filename containing a wildcard and click OK.
I see this exact problem reported in the thread:
http://groups.google.com/groups?hl=...&selm=%23JMQe7bmCHA.2828%40tkmsftngp04&rnum=3
When I tried the identical code in the 3rd post of the above thread, whose author couldn't reproduce the problem, the problem still happened to me.
I then created a new project which just opened a SaveFileDialog box and nothing else, and the problem didn't occur! So there has to be something that is going on in my code prior to bringing up the SaveFileDialog that breaks it. Any idea what this could be? I am coding in Managed C++, and the test code is:
SaveFileDialog* sfd = new SaveFileDialog();
sfd->Filter=S"Text files (*.txt)|*.txt|All files (*.*)|*.*";
sfd->FilterIndex=1;
sfd->DefaultExt=S"txt";
sfd->ShowDialog();
Since it is a over a year since the above-referenced post, I am hoping that someone else has gained some insight into this problem. In the mean time I'll start reorganizing my code to see if I can figure out what sets it off...
Thanks...
Dave
I see this exact problem reported in the thread:
http://groups.google.com/groups?hl=...&selm=%23JMQe7bmCHA.2828%40tkmsftngp04&rnum=3
When I tried the identical code in the 3rd post of the above thread, whose author couldn't reproduce the problem, the problem still happened to me.
I then created a new project which just opened a SaveFileDialog box and nothing else, and the problem didn't occur! So there has to be something that is going on in my code prior to bringing up the SaveFileDialog that breaks it. Any idea what this could be? I am coding in Managed C++, and the test code is:
SaveFileDialog* sfd = new SaveFileDialog();
sfd->Filter=S"Text files (*.txt)|*.txt|All files (*.*)|*.*";
sfd->FilterIndex=1;
sfd->DefaultExt=S"txt";
sfd->ShowDialog();
Since it is a over a year since the above-referenced post, I am hoping that someone else has gained some insight into this problem. In the mean time I'll start reorganizing my code to see if I can figure out what sets it off...
Thanks...
Dave