diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-21 20:04:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-21 20:04:48 +0000 |
commit | d154673f93ad95197bce8cadb995daa5bc39f5d8 (patch) | |
tree | 191522aa88f9f845a9c27b1ddb86116b87033c4b /src/modules/utils/hyperlink.cpp | |
parent | be50a70bfd8b3f3daf0c3351fdce6e2fea515bd7 (diff) |
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/utils/hyperlink.cpp')
-rw-r--r-- | src/modules/utils/hyperlink.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/utils/hyperlink.cpp b/src/modules/utils/hyperlink.cpp index 86fa58689b..7eaba363de 100644 --- a/src/modules/utils/hyperlink.cpp +++ b/src/modules/utils/hyperlink.cpp @@ -49,12 +49,12 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA SetWindowLongPtr(hwnd, 0, (LONG_PTR)dat); /* always succeeds */
/* fall thru */
case WM_SYSCOLORCHANGE:
- if ( !(dat->flags&HLKF_HASENABLECOLOR)) {
+ if (!(dat->flags&HLKF_HASENABLECOLOR)) {
if (GetSysColorBrush(COLOR_HOTLIGHT) == NULL) dat->enableColor = RGB(0, 0, 255);
else dat->enableColor = GetSysColor(COLOR_HOTLIGHT);
dat->focusColor = RGB(GetRValue(dat->enableColor) / 2, GetGValue(dat->enableColor) / 2, GetBValue(dat->enableColor) / 2);
}
- if ( !(dat->flags&HLKF_HASDISABLECOLOR))
+ if (!(dat->flags&HLKF_HASDISABLECOLOR))
dat->disableColor = GetSysColor(COLOR_GRAYTEXT);
break;
@@ -103,7 +103,7 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA case WM_LBUTTONDOWN:
{ POINT pt;
POINTSTOPOINT(pt, MAKEPOINTS(lParam));
- if ( !PtInRect(&dat->rcText, pt)) break;
+ if (!PtInRect(&dat->rcText, pt)) break;
SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwnd), STN_CLICKED), (LPARAM)hwnd);
return 0;
}
@@ -133,12 +133,12 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA { RECT rcWnd;
POINT pt;
HWND hwndParent;
- if ( !GetWindowRect(hwnd, &rcWnd)) break;
+ if (!GetWindowRect(hwnd, &rcWnd)) break;
pt.x = rcWnd.left;
pt.y = rcWnd.top;
hwndParent = GetParent(hwnd);
if (hwndParent == NULL) hwndParent = hwnd;
- if ( !ScreenToClient(hwndParent, &pt)) break;
+ if (!ScreenToClient(hwndParent, &pt)) break;
rcWnd.right = pt.x+(rcWnd.right-rcWnd.left);
rcWnd.bottom = pt.y+(rcWnd.bottom-rcWnd.top);
rcWnd.left = pt.x;
@@ -151,7 +151,7 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA case WM_CREATE:
case HLK_MEASURETEXT:
{ TCHAR szText[256];
- if ( !GetWindowText(hwnd, szText, SIZEOF(szText))) return 0;
+ if (!GetWindowText(hwnd, szText, SIZEOF(szText))) return 0;
lParam = (LPARAM)szText;
/* fall thru */
case WM_SETTEXT:
@@ -178,15 +178,15 @@ static LRESULT CALLBACK HyperlinkWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA }
if (dat->hEnableFont != NULL && hPrevFont != NULL) SelectObject(hdc, hPrevFont);
ReleaseDC(hwnd, hdc);
- if ( !fMeasured) return 0; /* text change failed */
+ if (!fMeasured) return 0; /* text change failed */
SendMessage(hwnd, HLK_INVALIDATE, 0, 0);
break;
}}
case WM_SETCURSOR:
{ POINT pt;
HCURSOR hCursor;
- if ( !GetCursorPos(&pt)) return FALSE;
- if ( !ScreenToClient(hwnd, &pt)) return FALSE;
+ if (!GetCursorPos(&pt)) return FALSE;
+ if (!ScreenToClient(hwnd, &pt)) return FALSE;
if (PtInRect(&dat->rcText, pt)) {
hCursor = (HCURSOR)GetClassLongPtr(hwnd, GCLP_HCURSOR);
if (hCursor == NULL) hCursor = LoadCursor(NULL, IDC_HAND); /* Win2000+ */
|