Is there a way to set the margins in a CEditView view class to stay permanent? In the program I am working on, I can set the margin in OnEnSetFocus, however, if the user starts a new document, the margin resets to its default. The default margin makes it difficult for the user to see where the text being since it is so close to the left wall of the frame.

Here is the code I use to set the margin in OnEnSetFocus:

void CMyAppView::OnEnSetfocus()
CEdit &rE = GetEditCtrl();
DWORD dwMargins = rE.GetMargins();
rE.SetMargins(3, HIWORD(dwMargins))