SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    SendMessage API for SetText

    Hi All,

    I am using the SendMessage api to set the text in textfield.
    But the text entered in text field is having only one character. Ex- I have to set the "Systems" then the api sets only "S" (i.e. only the first chr in the text field).

    Here is my code.

    [ ] use "mswtype.inc"
    [ ] use "mswmsg.inc"
    [ ]
    [-] dll "user32.dll"
    [ ] LRESULT SendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) alias "SendMessageA"
    [ ]
    [ ]
    [ ] int hWnd = TextField.GetHandle ()
    [ ] LRESULT = SendMessage (hWnd, WM_SETTEXT,0, "Systems")
    [ ]
    Please help where it is going wrong.
    Thanks in adavance..


    Pady

  2. #2
    Senior Member
    Join Date
    Jul 2008
    Posts
    179
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SendMessage API for SetText

    you could try aliasing it to SendMessageW instead of SendMessageA.

  3. #3
    Member
    Join Date
    Jul 2008
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SendMessage API for SetText

    Yes, it is working! Thank you!

    Can you please tell me What is the diff. bet SendMessageA and SendMessageW

    thanks,

  4. #4
    Senior Member
    Join Date
    Jul 2008
    Posts
    179
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SendMessage API for SetText

    SendMessageA is the legacy version for single byte strings, while SendMessageW is used with wide character strings. So usually what you want is SendMessageW, except maybe for controls expecting single byte strings.
    (I think you might be able to make SendMessageA working with the ansicall keyword in 4Test).

  5. #5
    Member
    Join Date
    Jul 2008
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: SendMessage API for SetText

    Thank you very much!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:35 PM.

Copyright BetaSoft Inc.