In the application for the media player, I hid the cursor with SetCursor(NULL) and so that Windows did not indicate a reset cursor state, I processed WM_SETCURSOR in my WndProc method.
protected override void WndProc(ref Message m) { switch (m.Msg) { case WM.SETCURSOR: base.WndProc(ref m); int lowWord = (m.LParam.ToInt32() << 16) >> 16; if (lowWord == HTCLIENT && FullScreen) { SetCursor(IntPtr.Zero);
However, when the cursor is in the client area (aka LOWORD(lParam) == HTCLIENT ), WM_SETCURSOR never starts in WndProc . Therefore, I never receive the WM_SETCURSOR message when the cursor is in the client area, and only receive it when LOWORD(lParam) != HTCLIENT .
However, in Spy ++, it clearly shows that the application received WM_SETCURSOR and WM_MOUSEMOVE .
Where is the message lost / processed? What do I need to do to receive a WM_SETCURSOR message in C #?
source share