; TextArea - ReadOnly
; Syntax Error
; userlib
; ************************
; .lib "user32.dll"
; SendMessage%(hwnd,msg,wParam,mParam):"SendMessageA"
; ************************
Const EM_SETREADONLY=$CF
win=CreateWindow("Read-Only Text Area",50,150,407,184,Desktop(),1)
textarea = CreateTextArea(18,26,361,96,win,1)
SetTextAreaFont textarea,LoadFont ("Tahoma",24,1)
AddTextAreaText textarea,"Edit me if you think your 'ard enough!"
lock=CreateButton("Locked (Read-Only)",100,130,120,20,win,2)
SetButtonState lock,True
SendMessage QueryObject(textarea,1),EM_SETREADONLY,1,0 ; lockdown
Repeat
ev=WaitEvent()
If ev=$401
If EventSource()=lock
SendMessage QueryObject(textarea,1),EM_SETREADONLY,ButtonState(lock),0
EndIf
EndIf
Until ev=$803
End
|