i have been experimenting around with simple programs using ave and open dialogs for text document and things, but i problem that i have just encountered, is that i made a simple text editor with a richtextbox, and i tried to save it in *.c, but when i open it up in an actual *.c editor, i get all of the misc information at the top which throws off the code. I found out that this is because when i save in *.c i need to save it in a plain text format, but in the same editor, i would like to also use a *.rtf format. my question is, how, when i select *.c format, do i change the save type from RichTextFormat, to plain textformat?
Any Help Is Greatly Appreciated

First of all can i assume that you have set the file types in the save dialog?

If you have then you could check the extension and if the extension is ".c" then save as plain text or if the extension is ".rtf" then save as rich text format.

your code should follow this seudo code above and your function should save accordingly.