[API ] SendMessage 怪問題
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (
ByVal hWnd As Long,
ByVal wMsg As Long,
ByVal wParam As Long,
ByVal lParam As String
) As Long
說明
hWnd Handle to the window whose window procedure will receive the message
Msg [in] Specifies the message to be sent.
wParam [in] Specifies additional message-specific information.
lParam [in] Specifies additional message-specific information.
-----------------------------------------------
說明
S為空字串
(1)
SendMessage handle_x , WM_GETTEXT , S , Len(S)
Text1.Text = S
結果:Text1.text仍是空字串
------------------------------------------
改為
(2)
SendMessage handle_x , WM_GETTEXT , Len(S) , S
Text1.Text = S
結果:Text1.text抓到我要的內容
怎麼會這樣,是差在哪?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.160.248.200
※ 編輯: saininniang 來自: 218.160.245.109 (07/25 02:09)
→
07/25 02:10, , 1F
07/25 02:10, 1F
→
07/25 03:21, , 2F
07/25 03:21, 2F
→
07/25 03:21, , 3F
07/25 03:21, 3F
推
07/25 19:30, , 4F
07/25 19:30, 4F
→
07/28 14:38, , 5F
07/28 14:38, 5F