From bfb5c0d76ef19b74c961517aba835ed536a0faad Mon Sep 17 00:00:00 2001 From: anders_k Date: Wed, 7 Nov 2018 01:28:41 +0000 Subject: [PATCH] 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 --- Contrib/Makensisw/utils.cpp | 7 +++++++ Contrib/Makensisw/utils.h | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Contrib/Makensisw/utils.cpp b/Contrib/Makensisw/utils.cpp index a016c00c..4ff3b1a4 100644 --- a/Contrib/Makensisw/utils.cpp +++ b/Contrib/Makensisw/utils.cpp @@ -1125,3 +1125,10 @@ void DrawGripper(HWND hWnd, HDC hDC, const RECT&r) DrawFrameControl(hDC, const_cast(&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; +} diff --git a/Contrib/Makensisw/utils.h b/Contrib/Makensisw/utils.h index ee34c707..b90372a1 100644 --- a/Contrib/Makensisw/utils.h +++ b/Contrib/Makensisw/utils.h @@ -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