Question

I'm trying to let the user select the file encoding when they load or save a file in C# and VS2008. Notepad's dialog boxes have an encoding drop down option at the bottom.

There is a way to do it as described in here: http://www.codeproject.com/KB/cs/getsavefilename.aspx.

However, I'm wondering if there is any easier way to do this. Windows must have this dialog built-in somewhere, isn't it?

Was it helpful?

Solution

The dialog that is built in is the standard File Open dialog provided by the Win32 API. This dialog allows customization through the use of hooks, as described in the Code Project article you reference.

The process described in the article is the only way to do this and is what Notepad and Visual Studio are doing if they are really using the Win32 file open dialog and not one of their own making.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top