Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exclude line number bar from QM code editor control
#2
Macro Macro3422
Code:
Copy      Help
1
out sub.IsMouseInScintillaEditArea(GetQmCodeEditor)

#sub IsMouseInScintillaEditArea
function! hwndSci

;Returns 1 if mouse is in a Scintilla control but not in margins. Else 0.
;
;hwndSci - Scintilla control handle. It can be any Scintilla control, eg in QM, LA, Notepad++.


POINT p; xm p
ScreenToClient hwndSci &p

RECT r; GetClientRect hwndSci &r
if(!PtInRect(&r p.x p.y)) ret

int i marginsWidth
for(i 0 5) marginsWidth+SendMessage(hwndSci SCI.SCI_GETMARGINWIDTHN i 0)

ret p.x >= marginsWidth


Messages In This Thread
RE: Exclude line number bar from QM code editor control - by Gintaras - 04-15-2024, 05:01 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)