Home > Software engineering >  Richedit single-line text set
Richedit single-line text set

Time:10-09

Richedit line of the output error in the output window background color change:

Compile results output for the first time, will appear the phenomenon of set the background color is not straight;
Now, thanks to the pictures can't upload to describe:
{first compile results output, specify the error row:
1 1 F C0012 identifier field に xu さ れ な い text が あ り ま す.
A part of the text in the text background color set success
}
Experts have know!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

The following code:
 long int nBegin=0, nEnd=0; 
Int nIndex=0;
NIndex=LineIndex (m_CurLine);
If ((nBegin=nIndex)!=1)
{
NEnd=nBegin + LineLength (nIndex);
SetSel (nBegin nEnd);
}
CHARFORMAT2 cf;
ZeroMemory (& amp; Cf, sizeof (CHARFORMAT2));
Cf. CbSize=sizeof (CHARFORMAT2);
Cf. DwMask=CFM_BACKCOLOR;
Cf. DwEffects & amp;=~ CFE_AUTOBACKCOLOR;
Cf. CrBackColor=RGB (85157255);
The UpdateData (1);
The UpdateData (0);
SendMessage (EM_SETCHARFORMAT SCF_SELECTION, (LPARAM) & amp; Cf);
If (m_OldStart!=1)
{
SetSel (m_OldStart m_OldEnd);
Cf. CrBackColor=RGB (239239239);
SendMessage (EM_SETCHARFORMAT SCF_SELECTION, (LPARAM) & amp; Cf);
}
If (m_OldStart==nBegin)
{
SetSel (m_OldStart m_OldEnd);
Cf. CrBackColor=RGB (85157255);
SendMessage (EM_SETCHARFORMAT SCF_SELECTION, (LPARAM) & amp; Cf);
}

M_OldStart=nBegin;
M_OldEnd=nEnd;
M_bErrLine=TRUE;

CodePudding user response:

RedrawWindow?

CodePudding user response:

RedrawWindow?
What does it mean to redraw the window? Or the code to add this function?

Adding will appear the error code is now have no clue, is now modified bug good urgent!!!
A great god can help investigate?
  • Related