[BUG_FIXED] Fix the error background bug of functionList.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1132 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2013-10-14 07:07:39 +00:00
parent ea1f12e7a2
commit 61a78b6628
1 changed files with 8 additions and 1 deletions

View File

@ -452,11 +452,18 @@ BOOL CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM
{
// if the text not found modify the background color of the editor
static HBRUSH hBrushBackground = CreateSolidBrush(BCKGRD_COLOR);
TCHAR text2search[MAX_PATH] ;
::SendMessage(_hSearchEdit, WM_GETTEXT, MAX_PATH, (LPARAM)text2search);
if (text2search[0] == '\0')
{
return FALSE; // no text, use the default color
}
HTREEITEM searchViewRoot = _treeViewSearchResult.getRoot();
if (searchViewRoot)
{
if (_treeViewSearchResult.getChildFrom(searchViewRoot))
return FALSE; // children found, use the default color
return FALSE; // children on root found, use the default color
}
else
return FALSE; // no root (no parser), use the default color