Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exclude line number bar from QM code editor control
#1
I've added a right-click menu trigger for the QM code editor control, but this causes the right-click comment functionality in the line number bar to fail.
Is there a simple way to exclude it?
I've encountered the same issue in LA as well.
Thanks in advance.

Function FF_QME
Trigger #R //FF_QME     Help - how to add the trigger to the macro
Code:
Copy      Help
;/
function# iid FILTER&f

if f.hwnd2=GetQmCodeEditor
,ret "QM_MR"

ret -2

Menu QM_MR
Code:
Copy      Help
test1 :"test1"
test2 :"test2"


Attached Files Image(s)
   
#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
#3
thank you so much!


Forum Jump:


Users browsing this thread: 1 Guest(s)