08-21-2022, 11:35 AM
Maybe this can help.
Macro Macro3229
Macro Macro3229
;Assume you want to add items to some list, menu, etc and implement a "go to source code" command.
;For it use function Statement in the function that adds a single item.
;This is a simplest example.
sub.Add("one")
1
sub.Add("two")
#sub Add
function $text
;get caller's QM item id and position in source code
int iid pos=Statement(1 0 0 iid)
;go to source code now
mac+ iid
int h=GetQmCodeEditor
act h
SendMessage h SCI.SCI_GOTOPOS pos 0
;Normally you would add iid/pos to an array and go to source code later on user request etc.
;Create a class. Let Add be a function of that class. Let the array be a class field (variable).