I've created my first MFC SDI dialog based app with serialization using CArchive. I can open/read/write/close using the menu controls to select the file that I use, everything seems to work great. What I would like to do is open this file at program execution and read/write and close on program termination automatically. I think the CFile class is what I need, but I kindof stuck as where and how to use this. I'm using the SetModifiedFlag function, when my arrays are changed, are there going to be any issues with this function using CFile class?
OK, I have implemented the CFile open read/write and it does open the file for reading/writing, but it does not populate my dialog like it should. If I open the same file again from the menu inside my program, it populates like it should. What's weird is that I have created a message box that tells me the file has been opened for read/write when I invoke CFile and it works when I start my app and as I stated earlier it does not populate my dialog, sooo I tried to open the file again from my menu created by MFC and this opens the file again and populates my dialog and also shows me the messge box again, telling me that the file opened successfully. WHY!?!
What am I doing wrong?
Very confused.