Moved RichEdit helper function to .cpp

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7044 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2018-11-07 01:28:41 +00:00
parent a6abbc6f4c
commit bfb5c0d76e
2 changed files with 8 additions and 6 deletions

View file

@ -1125,3 +1125,10 @@ void DrawGripper(HWND hWnd, HDC hDC, const RECT&r)
DrawFrameControl(hDC, const_cast<LPRECT>(&r), DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
}
}
bool RicheditHasSelection(HWND hRE)
{
CHARRANGE tr;
SendMessage(hRE, EM_EXGETSEL, 0, (LPARAM) &tr);
return tr.cpMax - tr.cpMin <= 0 ? FALSE : TRUE;
}

View file

@ -117,11 +117,6 @@ static inline void GetGripperPos(HWND hwnd, RECT&r)
r.top = r.bottom - GetSystemMetrics(SM_CYVSCROLL);
}
static bool RicheditHasSelection(HWND hRE)
{
CHARRANGE tr;
SendMessage(hRE, EM_EXGETSEL, 0, (LPARAM) &tr);
return tr.cpMax - tr.cpMin <= 0 ? FALSE : TRUE;
}
bool RicheditHasSelection(HWND hRE);
#endif