Hi:
I would like to save my own file (not *.txt, it contains picture and text), just like other softwares can save their own files. Is there any hint or way for me to do this?
I would appreciate that.
Hi:
I would like to save my own file (not *.txt, it contains picture and text), just like other softwares can save their own files. Is there any hint or way for me to do this?
I would appreciate that.
Don't laugh at me,I am just a SuperNewbie.
Thanks, mate. I've not yet tried, but I think there should be a Open or Save As dialog box pops up, then when we click "Save", it saves a file. and When we click "Open", it opens the relevant file type.
This file can contains any kinds of data, just like in the games(NOT only text), they have their own file types. Besides, I don't know if "fopen" can really save and open any kinds of data.
I am quite new on "save file" stuff, I would really appreciate that if someone is gonna help me and give me some hints, thanks alot.
Don't laugh at me,I am just a SuperNewbie.
You mean GetOpenFileName and GetSaveFileName
But they will only give you the file name selected - you have to write the code to actually work with the file. For this you can use fopen as it can write binary as well as text.
Or you can use iostreams or the API file functions - the choice is yours
Thanks again, GetOpenFileName and GetSaveFileName only show the dialog.
But could you please tell me that whether all the files are either in Binary or text? just files of all kinds, like... for instance, one software: user template (user can save his settings and load it next time when running the program).
Also, own made file can be named as any just like "*.abc" or something? and can be only open by the software which creates it.
Sorry for bothering you again. , thanks.
Don't laugh at me,I am just a SuperNewbie.
Internally, all files are treated the same - they are just full of numbers, but programmers make a distinction between binary and text based files for convinience. If you want the data to be readable, use text, if you dont want readbility and want speed, use binaryOriginally posted by SuperNewbie
But could you please tell me that whether all the files are either in Binary or text? just files of all kinds, like... for instance, one software: user template (user can save his settings and load it next time when running the program).
You can edit the registry to create a new class for your file type, then windows will open your app and pass the name of the file through the command lineOriginally posted by SuperNewbie
Also, own made file can be named as any just like "*.abc" or something? and can be only open by the software which creates it.
Thanks for your help, I've got a idea.
Don't laugh at me,I am just a SuperNewbie.
This is good
Only prob is that I myself cant seem to find out what it is they want me to do
It says :
I dont understand what is meant...how do i make that structure?(and pass it on.. i know what settings i want) a bit of help would be niceYou create and display an Open dialog box by initializing an OPENFILENAME structure and passing the structure to the GetOpenFileName function.
(btw sorry for asking questions in your thread SuperNewbie but it is kind of the same topic)
Its all a matter of willpower
To Oluf:
I think OPENFILENAME is the structure which contains the property the file that you are gonna handle, for instance:
"lpstrFilter" is the file type that gonna handle, " lpstrFile" is the initialized file name when Saving a file.
So before Open or Save file, we must initialze it with our desired properties. (At least we know what kind of file type we r handling )
Because GetOpenFileName and GetSaveFileName both are doing something about the file, that's why we have to pass the OPENFILENAME structure to the GetOpenFileName function.
I hope I don't misundertand your meaning. . thanks by the way for the link.
Don't laugh at me,I am just a SuperNewbie.
anonytmouse I am in the middel of that tutorial...but as I said i dont know how to make the struct for GetOpenFileName
thanks for your reply superNewbie (you cant be all newbie hehe) but I dont follow you 100%....still got no idea how to pass the struct...other then that I understand what you are saying
Its all a matter of willpower