Results 1 to 4 of 4

Thread: No time for research : (

  1. #1

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Please tell me how I can send a String to a specified window as the user would type it (like SendKeys() with hWnd support). SendMessage would work I think but I dont know about the flags:
    Code:
    SendMessage hWnd, WM_KEYDOWN, Asc(Mid(Text, A, 1)), 0
    [Edited by Fox on 10-20-2000 at 04:01 AM]

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Ah, sendMessageBystring should do the trick
    Code:
    Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
    
    Public Const WM_SETTEXT = &HC
    
    SendMessageByString YOurHwnd, WM_SETTEXT, 0, "This Is the string"

    [Edited by kedaman on 10-20-2000 at 04:20 AM]
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Not really, I want to type in the text and not set the caption...

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    WEll, you can't do it by sendmessage, at least i don't have the VK_'s for all the keys. Or can you use the same ones as in DirectInput?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width