Hi everyone,
I have a problem which is related to pass a record to api.
Example:
How to call SendMessage passing in lParam a RECT record.
Record Rect
Left As Long
Top As Long
Right As Long
Bottom As Long
End Record
...
With SendMessageApi
hwnd = {Some Handler}
wMsg = SEM_SETBOUNDS
wParam = 0
lParam = {Rect Record} <- Here is where i need the record to pass
Execute
End With
Thanks in advance.
API call - How to?
API call - How to?
Hi, here`s an example. You have to try it out.
I did not testet it because it`s not a filled in example.
I hope it helps otherwise send a message or comment.
best regards marco
Record Rect
Left As Long
Top As Long
Right As Long
Bottom As Long
End Record
Declare Send as "SendMessageA" of "user32"
hwnd As Long
wMsg As Long
wParam As Long
lParam As rect
result as long
end declare
send.hwnd=[windows handle of object]
send.wmsg=SEM_SETBOUNDS
send.wparam=0
`the rect values, rect is declared as lparam in the api send
send.lparam.left=100
send.lparam.top=100
send.lparam.right=100
send.lparam.bottom=100
send.execute
showmessage send.result ``get the result value
I did not testet it because it`s not a filled in example.
I hope it helps otherwise send a message or comment.
best regards marco
Record Rect
Left As Long
Top As Long
Right As Long
Bottom As Long
End Record
Declare Send as "SendMessageA" of "user32"
hwnd As Long
wMsg As Long
wParam As Long
lParam As rect
result as long
end declare
send.hwnd=[windows handle of object]
send.wmsg=SEM_SETBOUNDS
send.wparam=0
`the rect values, rect is declared as lparam in the api send
send.lparam.left=100
send.lparam.top=100
send.lparam.right=100
send.lparam.bottom=100
send.execute
showmessage send.result ``get the result value
-
- Posts: 6
- Joined: Tue Apr 30, 2013 10:35 am
API call - How to?
Hi Marco,
Thanks for the example.
I will try it and then say if it worked.
C?sar Baptista
Thanks for the example.
I will try it and then say if it worked.
C?sar Baptista
-
- Posts: 6
- Joined: Tue Apr 30, 2013 10:35 am
API call - How to?
Marco,
It Worked. ;)
Thank you very much.
It Worked. ;)
Thank you very much.