28.01.2026, 15:56
Eros, I had a chance to review your code. Thanks again!
I noticed the cursor wasn't changing for me when hovering over the scroll bar, it remained I-beam cursor. I added an extra line to make sure it changes to the arrow cursor and a couple minor safe improvements inside HexCtrl_WndProc().
I noticed the cursor wasn't changing for me when hovering over the scroll bar, it remained I-beam cursor. I added an extra line to make sure it changes to the arrow cursor and a couple minor safe improvements inside HexCtrl_WndProc().
Code:
CASE %WM_SETCURSOR
'-should only change the cursoer when LOWORD(lParam) = %HTCLIENT,
' otherwise Windows resets it right after you call SetCursor
IF LOWRD(lParam) <> %HTCLIENT THEN EXIT SELECT
IF wParam <> hWnd THEN EXIT SELECT
pState = HexCtrl_GetState(hWnd)
'-If you exit the SELECT without returning FUNCTION = 1 then
' windows will call DefWindowProc which resets the cursor back to I-beam.
'IF pState = 0 THEN EXIT SELECT
IF pState = 0 THEN FUNCTION = 0 :EXIT FUNCTION '-safer option.