how to stop certain keys--like #VK_UP--from being interpreted by EditorGadget?
in this example, the caret always jumps to last position--but, optimally, really nothing
should happen if #VK_UP gets pressed
Code: Select all
Global EditorNormalProc
Procedure.i EditorSubclassProc(hWnd, uMsg, wParam, lParam)
If uMsg=#WM_KEYUP And wparam=#VK_UP
p=Len(GetGadgetText(0))
SendMessage_(GadgetID(0),#EM_SETSEL,p,p) ;not-good attempt
EndIf
ProcedureReturn CallWindowProc_(EditornormalProc,hWnd,uMsg,wParam,lParam):
EndProcedure
OpenWindow(0,0,0,500,300,"")
EditorGadget(0,10,10,480,280)
Editornormalproc=SetWindowLong_(GadgetID(0),#GWL_WNDPROC,@EditorSubclassproc())
For i=0 To 10
AddGadgetItem(0,i,"Line "+Str(i))
Next
p=Len(GetGadgetText(0))
SendMessage_(GadgetID(0),#EM_SETSEL,p,p)
SetActiveGadget(0)
Repeat : Until WaitWindowEvent(10)=#WM_CLOSE