SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Dec 1999
    Location
    Pune,MS,India
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to pass window messages..?

    I have some problem in QA Partner
    How to pass windows messages to the controls through QAP....??

    Thanks,
    Sanjay

    ------------------
    sdas@questone.com

  2. #2
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to pass window messages..?

    Sanjay

    Assuming "I got your question" here is how you do "the deed". First you need the handle to the control or window you are sending to.

    This is done via:
    GetHandle() fortunately this is housed in the AnyWindow Class and gets you the window id you need to send the message to. The return is an integer. Lets define it as
    integer ci_handle = controlInterest.GetHandle()


    Ok so you got a window handle. Now lets send it a message. The DLL's to send messages and any number of other things are already encapsulated in some Segue inc files like
    mswfun32.inc .. if you don't automatically get these includes (and I think you do you may have to search for them and alter use path and explicitly include it). Look for
    something like:
    C:\Program Files\Segue\SilkTest\mswfun32.inc

    Anyway if you look into this include file you will find under user32.dll:
    LRESULT SendMessage (HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam) alias "SendMessageA"

    Which I suspect is what you are looking for.
    Simply use it like so:

    This will close the window (message no 16)whose handle is contained in ci_handle (as explained above).

    The String variable dummy is just there to satisfy the number of args the function requires. Address xlation is not performed on this and many other win32 dll calls so you won't get usefull info returned here.

    See my download section on Betasoft "shared memory between seperate processes" for that.

    ------------------
    "Smoke me a kipper, I'll be back for breakfast!"
    Sincerely
    Richard Weth
    Sr. QA Engineer
    mailto:rick_weth@yahoo.com
    phone(408) 487-3846



    [This message has been edited by rick_weth (edited 12-27-1999).]
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 09:14 AM.

Copyright BetaSoft Inc.