[.net] SaveFileDialog hook and FILEOKSTRING Notification
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement