summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-16 12:49:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-16 12:49:51 +0000
commit877f34a69f77c03dd9d48ebc7fe86a8ec56189c5 (patch)
tree1ab3eebfe4c67581e04de35b8b2d394c0480a14b /plugins/Scriver
parentda2edf0603f1552ef53325fa558c28a3c6fdec94 (diff)
fix for changing chat colors on the fly
git-svn-id: http://svn.miranda-ng.org/main/trunk@7678 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/chat/window.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 58c60c3481..4d0159739d 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1010,21 +1010,18 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
case WM_MOUSEMOVE:
- POINT pt;
+ POINT pt = { LOWORD(lParam), HIWORD(lParam) };
RECT clientRect;
- BOOL bInClient;
- pt.x = LOWORD(lParam);
- pt.y = HIWORD(lParam);
GetClientRect(hwnd, &clientRect);
- bInClient = PtInRect(&clientRect, pt);
- //Mouse capturing/releasing
+ BOOL bInClient = PtInRect(&clientRect, pt);
+ // Mouse capturing/releasing
if (bInClient && GetCapture() != hwnd)
SetCapture(hwnd);
else if (!bInClient)
ReleaseCapture();
if (bInClient) {
- //hit test item under mouse
+ // hit test item under mouse
DWORD nItemUnderMouse = (DWORD)SendMessage(hwnd, LB_ITEMFROMPOINT, 0, lParam);
if (HIWORD(nItemUnderMouse) == 1)
nItemUnderMouse = (DWORD)(-1);
@@ -1039,7 +1036,6 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
return mir_callNextSubclass(hwnd, NicklistSubclassProc, msg, wParam, lParam);
}
-
int GetTextPixelSize(TCHAR* pszText, HFONT hFont, BOOL bWidth)
{
if (!pszText || !hFont)
@@ -1148,10 +1144,11 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_LOG), EM_SETBKGNDCOLOR, 0, g_Settings.crLogBackground);
{
- //messagebox
- COLORREF crFore;
- CHARFORMAT2 cf;
+ // messagebox
+ COLORREF crFore;
LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, NULL, &crFore, FALSE);
+
+ CHARFORMAT2 cf;
cf.cbSize = sizeof(CHARFORMAT2);
cf.dwMask = CFM_COLOR | CFM_BOLD | CFM_UNDERLINE | CFM_BACKCOLOR;
cf.dwEffects = 0;