Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an application that requires that a filename be forced to upper case, lower case or left unchanged depending on a site-defined flag. I have my own version of CFileDialog to handle Save, SaveAs and Open but I have no idea how to deal with the possibility that the user will perform a Right Mouse Button select of one of the existing filenames in the FileDialog list and Rename one or more of the existing files. This action initially sends execution back through the File Dialog but that is prior to the user modifying the name. A subsequent select to rename another filename does not seem to give me the opportunity to adjust the previously selected/modified filename. In other words, the code does not seem to execute FileDialog::OnFileNameOK() the way hitting Enter or the Save button would. This puts Rename beyond my control.

Does anyone know what the ID is of the FileDialog List or the Rename edit box? Perhaps I can do an OnSelChangeEdit on the Rename edit box and capture each keystroke?

Any ideas?
Posted
Updated 14-Jan-10 9:41am
v4

RMB rename will also go through the File Dialog code but without necessarily triggering an OnOK condition (if the user continually selects new names to rename). If either Enter or the Save button gets hit then OnOK executes.
 
Share this answer
 
This question essentially answered by Richard MacCutchan when he answered my second question. I'm new to this site and I don't immediately see how to thank those who answered so let this be my "Thank You" to Mr. MacCutchan.
 
Share this answer
 
Hey Tom,
Thanks for the kind words.

The Quick Answers forum is fairly new here so there are still some links to be tidied up, but I know the CP team are working hard on it.

Good luck with your project.

Richard
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900