Hello,
another question about scintilla and I can't catch mouse leftclick event using the Scintilla callback.
I searched on scintilla documentation and google but nothing relevant for me.
Windows 10 64bits, Purebasic 5.72, GoScintilla 3.0.1
Thank you,
Kanter
[SOLVED] How to catch mouse left click with GOScintilla
-
- User
- Posts: 84
- Joined: Mon Sep 06, 2010 3:05 pm
[SOLVED] How to catch mouse left click with GOScintilla
Last edited by Maitre_Kanter on Sat Apr 18, 2020 9:06 pm, edited 1 time in total.
Re: How to catch mouse left click with Scintilla (GOSCIntill
I don't know if this would interfere with anything Scintilla does internally, but this works (Windows only):
Code: Select all
InitScintilla()
Global oldScintillaProc
Procedure.i ScintillaProc(hWnd, uMsg, wParam, lParam)
Protected Result
Select uMsg
Case #WM_LBUTTONDOWN
Debug "Left button down"
EndSelect
ProcedureReturn CallWindowProc_(oldScintillaProc, hWnd, uMsg, wParam, lParam)
EndProcedure
If OpenWindow(0, 0, 0, 320, 240, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ScintillaGadget(0, 0, 0, 320, 240, 0)
oldScintillaProc = SetWindowLong_(GadgetID(0), #GWL_WNDPROC, @ScintillaProc())
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
-
- User
- Posts: 84
- Joined: Mon Sep 06, 2010 3:05 pm
Re: How to catch mouse left click with Scintilla (GOSCIntill
Thank you wombats,
it is working but the goal of the functionality is to click on a line and analyze this line. #WM_LBUTTONDOWN event is posted before Scintilla selects the line.
This is why I just modified the event #WM_LBUTTONDOWN to #WM_LBUTTONUP
Kanter
it is working but the goal of the functionality is to click on a line and analyze this line. #WM_LBUTTONDOWN event is posted before Scintilla selects the line.
This is why I just modified the event #WM_LBUTTONDOWN to #WM_LBUTTONUP
Kanter