I tried to code an auto-indent functionality but I don't know how to catch event from external app.
My idea was to replace callback...
Code: Select all
sci = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
pb = Val(GetEnvironmentVariable("PB_TOOL_MainWindow"))
oldproc = SetWindowLong_(sci, #GWL_WNDPROC, @ScintillaWindowCallback())
Code: Select all
Procedure ScintillaWindowCallback(hWnd.l, Message.l, wParam.l, lParam.l)
result.l = 0
Select Message
Case #WM_NOTIFY
*lpnmhdr.NMHDR = lParam
*notify.SCNotification = lParam
Select *lpnmhdr\code
Case #SCN_CHARADDED
;....
Case #SCN_STYLENEEDED
;....
EndSelect
Default
result = CallWindowProc_(oldproc, hWnd, Msg, wParam, lParam)
EndSelect
ProcedureReturn result
EndProcedure