|
-
Feb 16th, 2002, 05:33 PM
#1
Thread Starter
New Member
Sendmessage to Notepad
Should be simple enough, but i cant get it to work. First time using API.
Im trying to send text to a Notepad window. Code is below:
---
winHwnd = FindWindow(vbNullString, "notepad.txt - Notepad")
If winHwnd <> 0 Then
msgbox "found"
SendMessage winHwnd, WM_SETTEXT, 0, "hello"
end if
---
It finds the proper window, hence I get "found" in a msgbox.
But it does not send the "hello" to the Notepad.
What am i doing wrong? Sample code would be appreciated. Thanx.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|