Share via

Problems with line numbering by CRichEditCtrl class

2022-05-09T05:22:43.6+00:00

Hi,
I'm using CRichEditCtrl control class and got some problems using line numbering option:
m_Edit.Create(ES_AUTOVSCROLL | ES_MULTILINE | ES_WANTRETURN | WS_CHILD | WS_VISIBLE | WS_VSCROLL, Rect, this, ID_EDIT);
m_Edit.GetParaFormat(pf);
pf.dwMask = PFM_NUMBERINGTAB | PFM_NUMBERINGSTART | PFM_NUMBERINGSTYLE | PFM_NUMBERING;
pf.wNumbering = PFN_ARABIC;
pf.wNumberingStyle = PFNS_PLAIN;
pf.wNumberingTab = 1000;
pf.wNumberingStart = 1;
m_Edit.SetParaFormat(pf);

  1. After receiving the text from a file by InStream function all string numbers are equal 1.
  2. In Windows 7 line numbers are growing from 1 to 255 and 255 is repeating up to the end of text. In Windows 10 the numbering is correct.
Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.