?
Solved

How to set margins on CRichEditView

Posted on 1998-10-10
2
Medium Priority
?
533 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 400 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

741 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