Permalink
Browse files

Fixed bug where saving notepad windows didn't work correctly

  • Loading branch information...
nickgammon committed Sep 26, 2010
1 parent b4128d4 commit 5e97cdfde237ce5fe71e944ebe127e3f214d8835
Showing with 5 additions and 3 deletions.
  1. +5 −3 TextView.cpp
View
@@ -231,9 +231,11 @@ void CTextView::SerializeRaw(CArchive& ar)
ASSERT_VALID(this);
if (ar.IsStoring())
- {
- WriteToArchive(ar);
- }
+ {
+ CString strContents;
+ GetEditCtrl().GetWindowText (strContents);
+ ar.Write(strContents, strContents.GetLength ());
+ }
else
{
CFile* pFile = ar.GetFile();

0 comments on commit 5e97cdf

Please sign in to comment.