Notes about using OutputStream-derived classes.

  1. The end of line in the MFC edit control buffer is represented by two characters /r/n. The integrity of data will be damaged if the text is inserted between these two control characters.
  2. The buffer of the CEdit-based control and the buffer of the CEditOutputStream object are surely the same only immediately after execution of the flush function/manipulator.
  3. If you are manipulating the data such as LPCTSTR then use CString constructor as an envelope before inserting it into the stream.
    void func( OutputStream& os, LPCTSTR str )

    os<<CString(str); // Instead of os<<str; 
    }
  4. For some reason that remains unclear to me I am unable to obtain a functioning CEdit object via call to GetEditCtrl() in the OnInitialUpdate(). The program looks approximately like this:
    void DerivedFromCEditView::OnInitialUpdate()
    {
    	CEditView::OnInitialUpdate();
    	pEdit=&GetEditCtrl());
    }
    pEdit does not point to a good object.
  5. Hosted by www.Geocities.ws

    1