0

I have created a bullet list in my rich edit control, but I am facing below issue which I am trying to tell you in a sequence.

  1. press a bullet button to generate a bullet.
  2. Bullet list/paragraph will start like MS word.
  3. save the document.
  4. Reload the same doc --> Now it is behaving strangely. It adds protection around bullet due to which user cannot delete bullet, also paragraph will not be maintained, a user needs to click again on the bullet button to start bullet paragraph.

see the code below:

code sample

   PARAFORMAT Pfm;
    richedit->GetParaFormat(Pfm);
Pfm.cbSize = sizeof(PARAFORMAT);
Pfm.dwMask = PFM_NUMBERING;


Pfm.wNumbering = PFN_BULLET;

richedit->SetParaFormat(Pfm);
richedit->SetFocus();
Yoon5oo
  • 496
  • 5
  • 11
hitesh
  • 1
  • 2

1 Answers1

1
  1. If you are using Document View Arch, then try this code

    PARAFORMAT Pfm = this->GetParaFormatSelection();
    Pfm.cbSize = sizeof(PARAFORMAT);
    Pfm.dwMask = PFM_NUMBERING;
    
    
    Pfm.wNumbering = PFN_BULLET;
    
    this->SetParaFormat(Pfm);
    this->SetFocus();
    
  2. If you are using Control, Save your document in RTF Format. This will persist your bullet structure as it is. Rich Text Box understands RTF format and can read and save a document as it is.

Yoon5oo
  • 496
  • 5
  • 11
Umesh Chavan
  • 614
  • 3
  • 11
  • Thanks, it worked, but now i am working on the maintaining indent . i tried also to put indent it worked, but it is not generating proper RTF file so while loading it again is loosing start indention and other formating like tabs/offset/space before/apace after. So could any one help me. thanks – hitesh Dec 06 '12 at 09:06