Link to home
Start Free TrialLog in
Avatar of chohs
chohs

asked on

How to set margins on CRichEditView

Hello !

I am programming a simple RTF editor using CRichEditView.

I have questions about page margins.

first, I want to know how to set Page Margins
when loading and saving a RTF file.
(for example, when loading a RTF file in WordPad sets same margins, but MS-Word sets its own page margins.)

(my program)
void CRTFEditView::OnInitialUpdate()
{
      ...
      SetMargins(CRect(720, 720, 720, 720));      
          // <--- always same margins(it's my problem)
          // You know, Ms-Word know a specific RTFdocumet,
          // so it can set margins when loading a RTF file.
          // how can I set margins of specific RTF document
       // when loading and saving a RTF file
          // like MS-Word.      
      ...
}


second, How to draw a line on CRichEditView ?
because I will display page margins by line.  ^.^

somebody help me.
thanks for reading.

ASKER CERTIFIED SOLUTION
Avatar of Darren_Simons
Darren_Simons

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Darren_Simons
Darren_Simons

I forgot to mention in my previous answer that you should be able to get some help about drawing lines from the same resource.