quick question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jtman

    #1

    quick question

    Hello
    I am trying to send text to another application
    I tried using SendMessage / WM_SETTEXT ...but to no avail could you help me
    out here?
    thanks for any help



  • James Sexton

    #2
    quick question:

    SendMessage ((HWND)hwnd,WM_ SETTEXT,(WPARAM ) length,
    (LPARAM) szText);

    is used for sending text to a Window, not an application.

    If you want to send a string or other variables to an
    applicaltion, then look up the the arguments of Main()
    in C# and try using on of the following functions to
    call your program :

    _spawn (); or _wspawn();
    _exec (); or _wexec();

    James Sexton





    Comment

    • MerkX Zyban

      #3
      Re: quick question

      JtMan,

      As James notes, WM_SETTEXT is for setting a Window's text (whatever that
      means to the targeted window). If you want to send data to an application
      you have several choices. Try looking into the following...

      WM_COPYDATA
      WM_APP
      DDE
      Mail Slots
      Named Pipes
      Clipboard
      RPC
      COM/DCOM


      Hope this helps.

      -MerkX


      Comment

      Working...