From cf163c920a2ccf50a4b818703b130048f2dd4836 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sat, 1 Dec 2018 01:16:24 +0100 Subject: [PATCH] show resize cursor on window borders --- src/main.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/main.c b/src/main.c index 420d011..7dbb4f2 100644 --- a/src/main.c +++ b/src/main.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -887,6 +888,40 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) // return DefWindowProc to prevent glitched window frame (dune 2000) return DefWindowProc(hWnd, uMsg, wParam, lParam); } + case WM_SETCURSOR: + { + // show resize cursor on window borders + if ((HWND)wParam == ddraw->hWnd) + { + WORD message = HIWORD(lParam); + + if (message == WM_MOUSEMOVE) + { + WORD htcode = LOWORD(lParam); + + switch (htcode) + { + case HTCAPTION: + case HTMINBUTTON: + case HTMAXBUTTON: + case HTCLOSE: + case HTBOTTOM: + case HTBOTTOMLEFT: + case HTBOTTOMRIGHT: + case HTLEFT: + case HTRIGHT: + case HTTOP: + case HTTOPLEFT: + case HTTOPRIGHT: + return DefWindowProc(hWnd, uMsg, wParam, lParam); + default: + break; + } + } + } + + break; + } case WM_D3D9DEVICELOST: { if (Direct3D9Active && Direct3D9_OnDeviceLost())