PB Hex Viewer
#3
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().

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.
Reply


Messages In This Thread
PB Hex Viewer - by Eros Olmi - 27.01.2026, 22:07
RE: PB Hex Viewer - by Jules Marchildon - 28.01.2026, 13:37
RE: PB Hex Viewer - by Jules Marchildon - 28.01.2026, 15:56
RE: PB Hex Viewer - by Eros Olmi - 28.01.2026, 18:07

Forum Jump:


Users browsing this thread: 2 Guest(s)