Solved

How to set margins on CRichEditView

Posted on 1998-10-10
2
499 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Macro to save highlighted rows as a separate file 5 45
notReplace  challenge 53 142
if loop in java 3 153
wordappend challenge 8 200
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

837 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