Solved

How to set margins on CRichEditView

Posted on 1998-10-10
2
509 Views
Last Modified: 2013-11-20
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.

0
Comment
Question by:chohs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
Darren_Simons earned 200 total points
ID: 1323167
I have seen the problem about margins before. ISTR I got round it by entering an RTF code for it which I found in the RTF specification (in MSDN).

If you're unable to find the article, e-mail me and I'll see if I can find it for you.

Darren (mail:Darren_Simons@yahoo.com)
0
 
LVL 1

Expert Comment

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

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 47
Host to IP 7 83
substring method in java 1 136
how to split multiple lines delimiter : 8 119
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question