Results 1 to 9 of 9

Thread: how to send text to a window message

Hybrid View

  1. #1

    Thread Starter
    Banned nareth's Avatar
    Join Date
    Jun 2004
    Posts
    1,206

    Re: how to send text to a window message

    send text to a hwnd like i sayd.

    i know hwnd is handle of window.
    i have API and C++ experience with windows juts not sedning text to them

  2. #2
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: how to send text to a window message

    Like I have already said...What is the hWnd of?
    What text do you want to send?

    You MUST elaborate on your question instead of repeating yourself over and over again.
    We are aware you want to send text to the handle of a window, and the only way to do this is by using API, so we assumed that already.

    What is the hWnd of and what text?
    Is the hWnd a combobox, text box, listbox...what?
    They are different commands for different things.
    You cannot just send random text to a random hWnd, nothing will happen.

    Woka

  3. #3

    Thread Starter
    Banned nareth's Avatar
    Join Date
    Jun 2004
    Posts
    1,206

    Re: how to send text to a window message

    hwnd is a ordinairy textbox i think or RTB

  4. #4
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: how to send text to a window message

    Code:
    Option Explicit
    
    Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Private Const WM_SETTEXT = &HC
    
    Private Sub Form_Load()
    Dim strWoof As String
        strWoof = "Mooose"
        SendMessage Text1.hwnd, WM_SETTEXT, 0&, ByVal strWoof
    End Sub
    Out of interest did you try searching for "API and text and textbox"??? HUNDREDS of results.

    Woka

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