Jump to content
  • Advertisement
Sign in to follow this  
CodeReaver

[.net] SaveFileDialog hook and FILEOKSTRING Notification

This topic is 4415 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to use this in C#? http://windowssdk.msdn.microsoft.com/en-us/library/ms646870(VS.80).aspx I've looked on msdn and google and there's nothing on how to use it in C#. I can't find the value to use for FILEOKSTRING and I also tried putting a break point by the notify message in the hook procedure. The only message that gets sent because of clicking OK is the OK message.

Share this post


Link to post
Share on other sites
Advertisement
Why not just overried the fileok method. Double click on the component and you will get an event that is hooked up automatically...

this.saveFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.saveFileDialog1_FileOk);

here is the event ...

private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
{
}


You might be able to use something in the canceleventargs


Otherwise I would say that you will need to create an inherited class and override the wndproc method or something, though I see that does not work as it appears the savefiledialog is a sealed class.

Share this post


Link to post
Share on other sites
Thanks for that one! It's much simpler than what I was trying to do.

EDIT: Ah... I still need to get the file names into that function somehow. Maybe I should cast sender to a SaveFileDialog.
EDIT 2: Yeah, that did it.

[Edited by - CodeReaver on October 15, 2006 5:54:16 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!