Solved

Line Numbers in RichEdit

Posted on 2003-10-24
7
352 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 44

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 44

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bobThere java chalenge 45 92
Detect CR LF to each line 12 163
conditional code and condition difference 9 83
matchUp  challenge 9 110
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. …
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.
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…

831 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