oleview: Properly handle negative coordinates for mouse events.
This commit is contained in:
parent
7d8ef2e19e
commit
4a464ef03a
|
@ -73,11 +73,11 @@ LRESULT CALLBACK PaneProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
SetCursor(LoadCursor(0, IDC_SIZEWE));
|
SetCursor(LoadCursor(0, IDC_SIZEWE));
|
||||||
break;
|
break;
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
if(LOWORD(lParam) >= GetSplitPos(hWnd)-pane->size/2 &&
|
if((short)LOWORD(lParam) >= GetSplitPos(hWnd)-pane->size/2 &&
|
||||||
LOWORD(lParam) <= GetSplitPos(hWnd)+pane->size/2)
|
(short)LOWORD(lParam) <= GetSplitPos(hWnd)+pane->size/2)
|
||||||
{
|
{
|
||||||
pane->last = -1;
|
pane->last = -1;
|
||||||
DrawSplitMoving(hWnd, LOWORD(lParam));
|
DrawSplitMoving(hWnd, (short)LOWORD(lParam));
|
||||||
SetCapture(hWnd);
|
SetCapture(hWnd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -85,7 +85,7 @@ LRESULT CALLBACK PaneProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
if(GetCapture() == hWnd)
|
if(GetCapture() == hWnd)
|
||||||
{
|
{
|
||||||
pane->last = -1;
|
pane->last = -1;
|
||||||
DrawSplitMoving(hWnd, LOWORD(lParam));
|
DrawSplitMoving(hWnd, (short)LOWORD(lParam));
|
||||||
|
|
||||||
MoveWindow(pane->left, 0, 0,
|
MoveWindow(pane->left, 0, 0,
|
||||||
GetSplitPos(hWnd)-pane->size/2, pane->height, TRUE);
|
GetSplitPos(hWnd)-pane->size/2, pane->height, TRUE);
|
||||||
|
@ -97,7 +97,7 @@ LRESULT CALLBACK PaneProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
if(GetCapture() == hWnd)
|
if(GetCapture() == hWnd)
|
||||||
DrawSplitMoving(hWnd, LOWORD(lParam));
|
DrawSplitMoving(hWnd, (short)LOWORD(lParam));
|
||||||
break;
|
break;
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
if((int)wParam != TYPELIB_TREE) break;
|
if((int)wParam != TYPELIB_TREE) break;
|
||||||
|
|
Loading…
Reference in New Issue