开发者

Looking for a PInvoke style way to customise the SaveFileDialog using System.Windows.Forms.CommonDialog

开发者 https://www.devze.com 2023-04-09 05:30 出处:网络
I would like to write an implementation of System.Windows.Forms.SaveFileDialog extending from System.Windows.Forms.CommonDialog and using the bool RunDialog(IntPtr hwndOwner) method to register a cust

I would like to write an implementation of System.Windows.Forms.SaveFileDialog extending from System.Windows.Forms.CommonDialog and using the bool RunDialog(IntPtr hwndOwner) method to register a custimisation hook.

I开发者_StackOverflow社区 used George Mihaescu's 2007 article on extending the print dialog for a similar use-case where I needed to add controls to the print dialog as a basis for printing but extended the example somewhat, I effectively want to use the same approach to saving.

I can't seem to find much information on the structures and extensions available, in particular I can't find the equivelant of the PRINTDLG structure. The closest I've found is the MSDN article on the Common Item Dialog


Here's an article detailing how to extend the common file dialogs, save in particular, through Win32 API. I've basically followed this example in my extended open and save dialog implementations. I've simply added an additional text box below the file type combo box.

My implementation is closed source so I cannot share it. However, I've have no issues running this code on Win2k through Win7 (x86 or x64).

http://www.codeproject.com/KB/cs/getsavefilename.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消