Cyber Axe Posted July 5, 2005 Share Posted July 5, 2005 all i want to do is add an encoding drop down menu to it like in notepad but thers no built in function to do and the only info i can find comes from http://www.dotnet247.com/247reference/msgs/45/228852.aspxthough it is way over my head does anyone know any good examples of how to do this? Link to comment Share on other sites More sharing options...
dman Posted July 5, 2005 Share Posted July 5, 2005 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 More sharing options...
Delprat Posted July 5, 2005 Share Posted July 5, 2005 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 More sharing options...
-M- Posted July 6, 2005 Share Posted July 6, 2005 (edited) Have a look at this article: http://www.codeproject.com/csharp/GetSaveFileName.aspSeems 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? Edited July 6, 2005 by -M- Link to comment Share on other sites More sharing options...
Cyber Axe Posted July 7, 2005 Author Share Posted July 7, 2005 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.<{POST_SNAPBACK}>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 outWell, 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<{POST_SNAPBACK}>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 werebesides i cant add any more types to the list cos ive pretty much maxed it out by putting in almost all text based file typesHave a look at this article: http://www.codeproject.com/csharp/GetSaveFileName.aspSeems 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?<{POST_SNAPBACK}>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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now