sendmessage
sendmessage
i see no sendmessage in this language i want to use scintilla in an editor i`m working on. I use rapidq. In rapidq sendmessage is use a lot. can someone help me.
sendmessage
I put an example.
`Code
Const EM_SETMARGINS=&HD3
Const EC_LEFTMARGIN=&H1
Const EC_RIGHTMARGIN=&H2
Declare SendMessageAPI As "SendMessageA" of "user32"
Hwnd As Long
wMsg As Long
wParam As Long
lParam As Long
Result As Long
End Declare
Object frmForm as Form
Caption="Form"
Width=640
Height=480
Center
`Other objects
Object rchEditor as Richedit
Top=10
left=10
Width=600
Height=400
Plaintext=True
Wordwrap=False
WantTabs=True
Scrollbars=ssBoth
End Object
`End other objects
Onshow=frmForm_Onshow
End Object
frmForm.Showmodal
Sub frmForm_Onshow
`Set margins
With SendMessageAPI
Hwnd=rchEditor.Hwnd
wMsg=EM_SETMARGINS
wParam=EC_LEFTMARGIN Or EC_RIGHTMARGIN
lParam=20+20*&H10000
Execute
End With
End Sub
`End code
`Code
Const EM_SETMARGINS=&HD3
Const EC_LEFTMARGIN=&H1
Const EC_RIGHTMARGIN=&H2
Declare SendMessageAPI As "SendMessageA" of "user32"
Hwnd As Long
wMsg As Long
wParam As Long
lParam As Long
Result As Long
End Declare
Object frmForm as Form
Caption="Form"
Width=640
Height=480
Center
`Other objects
Object rchEditor as Richedit
Top=10
left=10
Width=600
Height=400
Plaintext=True
Wordwrap=False
WantTabs=True
Scrollbars=ssBoth
End Object
`End other objects
Onshow=frmForm_Onshow
End Object
frmForm.Showmodal
Sub frmForm_Onshow
`Set margins
With SendMessageAPI
Hwnd=rchEditor.Hwnd
wMsg=EM_SETMARGINS
wParam=EC_LEFTMARGIN Or EC_RIGHTMARGIN
lParam=20+20*&H10000
Execute
End With
End Sub
`End code