carl404
asked on
Line Numbers in RichEdit
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 ?
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 ?
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
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
Good Luck
ASKER
hmm... This is not what I am looking for. I want something more like http://www.pnotepad.org/ line number indicator.
Thanks anyway :)
Thanks anyway :)
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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).