How to change the filename when the user clicks OK button

  • Thread starter Thread starter sowen
  • Start date Start date
S

sowen

I am using the ExtensibleDialog to create a dialog for our internal
program use. We want the user select some items in our own controls,
and then generate the filename to the textbox. But that is just the
temporary filename, the final filename can only be generated after the
user clicks "OK" button, because of some concurrency issues.

I can use OFNHookProc to catch the event when the user clicks OK
button, and get the filename from LParam, changing the filename works,
and then returns the dialog to windows. But the saved file is still
just the temporary filename, not my modified name.

The problem I am having is, after I change the filename, how to tell
Windows save the file with my modified name? Do I need to send a
message back or something?

I am using c# in VS2005.
Thanks.
 
sowen said:
I am using the ExtensibleDialog to create a dialog for our internal
program use. We want the user select some items in our own controls,
and then generate the filename to the textbox. But that is just the
temporary filename, the final filename can only be generated after the
user clicks "OK" button, because of some concurrency issues.

I can use OFNHookProc to catch the event when the user clicks OK
button, and get the filename from LParam, changing the filename works,
and then returns the dialog to windows. But the saved file is still
just the temporary filename, not my modified name.

The problem I am having is, after I change the filename, how to tell
Windows save the file with my modified name? Do I need to send a
message back or something?

I am using c# in VS2005.
Thanks.

solved, ignore it please :D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top