Information générale
Catégorie:
Microsoft Foundation Classes
As practice problem I'm trying to make a notepad like application.
The SDI application is created by the wizard,but I created the editbox
in the View's onInitialUpdate() function using Create() function.
If user resizes the window,the Editbox is resized in the View's
OnDraw() function.
Now the problem is how I save the text in a file using the serialize()
function of the Document Class.
What I tried is, I included the View's header file in Document's header
file,in the Serialize() function I created the View Object then using
the View Object accessed the editbox's pointer (which was used to create the
editbox in view).With this pointer I called the GetWindowText() and
SetWindowText() functions to fetch the editbox's text.After that I
passed that to the Archive objects insertion and extraction operators,
but I get error stating 'memory could not be read'.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement