BCGSoft Professional Editor for MFC
virtual void CBCGPEditCtrl::OnGetCharColor ( TCHAR  ch,
int  nOffset,
COLORREF &  clrText,
COLORREF &  clrBk 
)
inlinevirtual

Called by the framework when it draws the text and it needs to retrieve the color for the current character to be drawn.

OnGetCharColor is called by the framework when it draws the text and it needs to retrieve the color for the current character to be drawn. It's called only when the current character does not belong to any block or highlighted word.

You can override this function in order to control the coloring of separate characters in text. Be aware of performance issues.

The default implementation does nothing.

Parameters
chSpecifies the character whose color is being determined.
nOffsetSpecifies the zero-based offset of this character in text.
clrText[out] When the function returns, should contain the character's text color .
clrBk[out] When the function returns, should contain the character's background color .