Solved

Line Numbers in RichEdit

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now