Click to See Complete Forum and Search --> : win32 vs MFC


jolley
March 14th, 2005, 11:19 PM
hello guy,i am proceeding a programme,the main purpose is that i wanna to make a simple eximation system.so if u have done such thing,the first thing that u can come up with a idea that why not do it in the database way.while my client presents me a requirement:no MIS,but as simple as possible. a dialogue that can input the name and the score that each examinee get will be fine!

so he give me a puzzle,whether a win32 or a MFC will do,personally i would like to use the win32 app,and i can store it in the filestream,but after i have done a database ,the dialogue is added in the MFC way!

and i have to know how to store a data,suppose u have created a map,and u want to store it in the file?and any other ways to store things?

i am wondering the difference between win32 and the MFC,also the ideas that will be useful to my programme!
regards,
jolley

Ejaz
March 15th, 2005, 12:21 AM
Win32 vs. MFC - Part I (http://www.codeproject.com/cpp/mfc_architecture.asp)
Win32 vs. MFC - Part II (http://www.codeproject.com/cpp/mfc_architecture2.asp)

How to store data?
Well, that depends upon the complexity of the data, how frequently it is suppose to be accessed, will it be accessed sequentially or randomly etc. Since you don't want to use any database, so you can use .xml file to store data, but that might be also an overkill if the data is pretty simple. You can simple use a flat file, design your strucuture, i.e. how you want to store the data (order of the data).

jolley
March 15th, 2005, 02:04 AM
thanks guy for your kind reply.and i intend to do the programme only when the examination comes.and usually,it is kept closed!first i'd like to use a map,because u know that map provides one key and one value to me ,fortunately,i need it to record the name and the score of the students,
but anyway,the map isnot suitable,because once the function the map resides goes out of scope,the map will be destroyed automatically,so i wanna put the map in the file,but i donot know how!
also my client asked me to create a dialogue for him.for he thought that he liked it more than anything else to express .so again comes my question.how to create a dialogue in the win32 platform? it is feasible for me create a dialogue in the win32?
regards,
jolley

Ejaz
March 15th, 2005, 02:11 AM
Well, if you have any code or design established so far, then it would be better if you post it. If map is being destroyed because its getting out of the scope, then you can change its scope, place it somewhere which is accessible through out the life-time of the program or until it should exist.

You can create a class, which can aggregate map in it, provides the public methods to set/get data from map.

For creating the dialog in win32, just create a dialog template in resource editor, and then use DialogBox (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/dialogboxes/dialogboxreference/dialogboxfunctions/dialogbox.asp). For reference, have a look at Using Dialog Boxes (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/dialogboxes/usingdialogboxes.asp)

jolley
March 15th, 2005, 03:10 AM
while thanks indeed!and i get a lot from your message,then i have to ask further,
yeah i agree,putting the map encapsulated in the class is a nice method,however,any other methods?what about placING the map in the file?as we know that the file has file scope,and after i do that i cannot worry about the map's validation again
regards,
jolley

Ejaz
March 15th, 2005, 03:25 AM
Well placing map at file scope is fine, but what you mean by "map's validation "?