I have created a borderless window that uses a wndProc() function that forces the WM_NCHITTEST case to return HTCAPTION;, which allows the user to drag the window, no matter where his cursor is located.
The problem is that I have set up a custom cursor, but with the abovementioned method, the cursor is always set back to IDC_ARROW.
How do I fix this?
EDIT: I’ve also tried using SetCursor() in the WM_NCHITTEST case, but it didn’t work.
You can use the WM_SETCURSOR message to override the cursor. The LOWORD of lParam indicates the hit test code, the one that you altered with the WM_NCHITTEST handler. This worked well:
Initialize CustomCursor in your window init. Say: