Solved

How to set margins on CRichEditView

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

732 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