BCGControlBar Pro for MFC
virtual BOOL CBCGPEditCtrl::OnGetWordColor ( const CString &  strWord,
COLORREF &  clrText,
COLORREF &  clrBk,
int  nPos 
)
virtual

Called by the edit control when it draws the text and needs to retrieve the current word color.

Returns
Should return FALSE if the word's color is different that the default color. Should return TRUE if this function needs to alter the word's color.

You should override this function in a derived class if you want to customize the default coloring algorithms.

OnGetWordColor is called only when the current word does not belong to any color area (like selection or other block).

Under a "word" is meant any sequence of characters, which does not belong to the list of delimiters m_strWordDelimiters.

The default implementation looks for strWord in the internal color map m_mapWordColors. This map is manipulated by the following methods:

Parameters
strWordSpecifies the word whose color is being determined.
clrText[out] When the function returns TRUE, contains the foreground color of the word.
clrBk[out] When the function returns TRUE, contains the background color of the word.
nPosSpecifies the offset of the word in the edit control's text.