12,064,291 members (44,771 online)
Rate this:
See more:
hi,
i want to change the color and size of the bullets in a richedit,and do not change the text.

i do not get a effective method to do it.

I found that ,i can change the font ,color and size of bullets in word,and i want to get the effect look like the word.

who can help me?

```    //Set Bullets
// here ,it work well,i can see the Bullets
PARAFORMAT2 pf2;
pf2.cbSize = sizeof(PARAFORMAT2);
pf2.wNumbering = PFN_BULLET;
SetSel(imInfo.iLastStart,imInfo.iLastStart+1);
SetParaFormat(pf2);

//i want to change the color and size of the Bullets
CHARFORMAT cfPoint = m_curcf;
cfPoint.crTextColor = RGB(120,120,120);
cfPoint.yHeight = 13*13;

//?????????????
//here，what shall i do to get the effect.
```
Posted 28-Nov-12 16:00pm
Edited 28-Nov-12 16:03pm
v3
lin98666521 6-Dec-12 0:13am

i have Solve the problem by myself.
i find that,the color and size of the bullets are the same to the last "\r",so i remeber the position ,and find the first "\r" from the position to set it color and size.

if(imInfo.iLastStart!=0)
{
SetSel(imInfo.iLastStart,imInfo.iLastStart+1);
SetParaFormat(pf2);

FINDTEXTEXW ft;//
ft.chrg.cpMin = imInfo.iLastStart;
ft.chrg.cpMax = -1;
ft.lpstrText=_T("\r");
long n = FindText(FR_DOWN,ft);
if(n!=-1)
{
SetSel( n,n+1);
SetWordCharFormat( cfPoint );
}
imInfo.iLastStart = 0;
}

Rate this:

## Solution 1

i have Solve the problem by myself.
i find that,the color and size of the bullets are the same to the last "\r",so i remeber the position ,and find the first "\r" from the position to set it color and size.

```if(imInfo.iLastStart!=0)
{
SetSel(imInfo.iLastStart,imInfo.iLastStart+1);
SetParaFormat(pf2);

FINDTEXTEXW   ft;//
ft.chrg.cpMin   =   imInfo.iLastStart;
ft.chrg.cpMax   =   -1;
ft.lpstrText=_T("\r");
long   n   =  FindText(FR_DOWN,ft);
if(n!=-1)
{
SetSel( n,n+1);
SetWordCharFormat( cfPoint );
}
imInfo.iLastStart = 0;
}
```
v2

Top Experts
Last 24hrsThis month
 d@nish 200 CPallini 175 CHill60 120 OriginalGriff 74 BillWoodruff 55
 Dave Kreskowiak 1,837 Richard MacCutchan 1,250 d@nish 980 OriginalGriff 874 CPallini 750