If I don't check the return code of ::GetCursorPos like this (in ScintillaWin.cxx):
case WM\_SETCURSOR: if \(LoWord\(lParam\) == HTCLIENT\) \{ if \(inDragDrop == ddDragging\) \{ DisplayCursor\(Window::cursorUp\); \} else \{ // Display regular \(drag\) cursor over selection POINT pt; if \(0 \!= ::GetCursorPos\(&pt\)\) \{ ::ScreenToClient\(MainHWND\(\), &pt\); if \(PointInSelMargin\(Point\(pt.x, pt.y\)\)\) \{ DisplayCursor\(GetMarginCursor\(Point\(pt.x, pt.y\)\)\); \} else if \(PointInSelection\(Point\(pt.x, pt.y\)\) && \!SelectionEmpty\(\)\) \{ DisplayCursor\(Window::cursorArrow\); \} else if \(PointIsHotspot\(Point\(pt.x, pt.y\)\)\) \{ DisplayCursor\(Window::cursorHand\); \} else \{ DisplayCursor\(Window::cursorText\); \} \} \} return TRUE; \} else \{ return ::DefWindowProc\(MainHWND\(\), iMessage, wParam, lParam\); \}
I get an Assertion failue (something with Virtual Space < 80000).
The GetCursorPos error was "Access Denied" (my code at frist checked which error).
The problem often occurs when the editor has been left alone for a long time (in which case my screen saver also switches on).
That did not look well. The important part is:
if (0 != ::GetCursorPos(&pt)) {
...
}
wm_setcursor (rewritten)
OK, committed.