Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Line Numbers in RichEdit

Posted on 2003-10-24
7
Medium Priority
?
372 Views
Last Modified: 2013-11-20
Hi!
I have two simply questions ;)

1. How to add a column with line numbers on the left side of richedit ?
2. Some applications are using a kind of property sheet to gather all text editor windows and comfortably switch between them. This is a MSVS .net fashion property sheet for text windows. How to do it ?

0
Comment
Question by:carl404
7 Comments
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 9612648
Part 1)
You will have to add the line numbers yourself to each line of text as the user enters it (or as it is loaded from file).
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9613594
Try this

PARAFORMAT2 pf2;
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_NUMBERING | PFM_NUMBERINGSTART | PFM_NUMBERINGSTYLE;
pf2.wNumbering = 3;
pf2.wNumberingStart = 1;
pf2.wNumberingStyle = 2;
::SendMessage(RE30->Handle, EM_SETPARAFORMAT, 0, (LPARAM) &pf2);

Good Luck
0
 

Author Comment

by:carl404
ID: 9615057
hmm... This is not what I am looking for. I want something more like http://www.pnotepad.org/ line number indicator.
Thanks anyway :)
0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 9616061
If it is just display (not user entry) then you could code your own view based on a CScrollView.  That gives you complete control over how it is displayed
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 11975749
Submitted to PAQ with no points refunded (of 90)

DarthMod
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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: 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. …
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

927 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