Jump to content

Extending the Save As Common Dialog


Recommended Posts


You are right. This would be very complicated since savefildialog class is sealed and cannot be subclassed. whats up with that?.

You would need to hook WM_INITDIALOG somehow and then draw in new combo box. Even then you still have to write the functionality for the encoding. It would be much easier to just build your own savefiledialog class from scratch, theres really not that much to it. Then you would have class you could subclass for any kind of use like this.

Link to comment
Share on other sites

Well, the simplest method is to use the "file type" combo... (as in Word : there is ".doc 6.0", ".doc 97" & ".doc 2003")

In Notepad, it would be something like :

.txt (Unicode)

.txt (ANSI)

.txt (UTF-8 low)

.txt (UTF-8 high)

and so on.

When the user click "save", you retrieve the "encoding" from the "file type" combo.

bye

Link to comment
Share on other sites

You are right. This would be very complicated since savefildialog class is sealed and cannot be subclassed. whats up with that?.

You would need to hook WM_INITDIALOG somehow and then draw in new combo box. Even then you still have to write the functionality for the encoding. It would be much easier to just build your own savefiledialog class from scratch, theres really not that much to it. Then you would have class you could subclass for any kind of use like this.

i wanted to avoid making me own so it both kept the windows feel and worked with any future vers of windows (incase the look of the dialog ever changes) and such but i may have to resort to that if i cant figure it out

Well, the simplest method is to use the "file type" combo... (as in Word : there is ".doc 6.0", ".doc 97" & ".doc 2003")

In Notepad, it would be something like :

.txt (Unicode)

.txt (ANSI)

.txt (UTF-8 low)

.txt (UTF-8 high)

and so on.

When the user click "save", you retrieve the "encoding" from the "file type" combo.

bye

i'd like to have an actual encoding box like other apps do and cos i want my notepad app to look as much like the origonal as possible ot keep simplicity and seamless ness as it were

besides i cant add any more types to the list cos ive pretty much maxed it out by putting in almost all text based file types

Have a look at this article: http://www.codeproject.com/csharp/GetSaveFileName.asp

Seems to be exactly what you need. :)

edit: I wasn't sure about which language you want to use, but I guess it's csharp, isn't it?

thanks though i need it for Visual Basic 2005 Beta 2 which i stuck in the subtitle though i may be able to figure something out with this

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...