News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Attempting to send messages to another process

Started by boogara, January 11, 2008, 03:41:12 AM

Previous topic - Next topic

boogara

Quote from: Ehtyar on January 12, 2008, 10:37:27 PM
Nice code, congrats.

Ehtyar.
Thanks :)  Although it's not working so well for what seems to be modal-less(?) dialogs and the such (basically dialogs that don't don't have a window caption or the like), it works for a couple of options...so now I just got to find a way to do the rest.

jj2007

Quote from: boogara on January 12, 2008, 01:38:22 AM
   
   invoke ChildWindowFromPoint,ChWnd,703,58;665,59


Hmmm... does this actually work? Given that ";" comments out the rest, this assembles as

invoke ChildWindowFromPoint,ChWnd,703,58

MSDN says this:
HWND ChildWindowFromPoint(     
    HWND hWndParent,
    POINT Point
);

So the arg behind ChWnd should be one pointer, not two coordinates. However, I tested this and the invoke ChildWindowFromPoint,ChWnd,703,58 does assemble without warnings. Is that a peculiarity of Masm32?

boogara

Quote from: jj2007 on January 23, 2008, 09:33:15 AM
Quote from: boogara on January 12, 2008, 01:38:22 AM
   
   invoke ChildWindowFromPoint,ChWnd,703,58;665,59


Hmmm... does this actually work? Given that ";" comments out the rest, this assembles as

invoke ChildWindowFromPoint,ChWnd,703,58

MSDN says this:
HWND ChildWindowFromPoint(     
    HWND hWndParent,
    POINT Point
);

So the arg behind ChWnd should be one pointer, not two coordinates. However, I tested this and the invoke ChildWindowFromPoint,ChWnd,703,58 does assemble without warnings. Is that a peculiarity of Masm32?
Actually, it does work strangely.  I use RadASM for my masm programming, so it might be different for you...but, when I type invoke ChildWindowFromPoint, the helper-popup thing gives me three parameters...a HWND, and an X & Y co-ordinate.  Kinda weird, but...meh.

jj2007

Quote from: boogara on January 23, 2008, 03:40:56 PM
I use RadASM for my masm programming, so it might be different for you
Nope, it's not different for me, using MASM. It works with handle + 2 points... weird indeed. Hutch might know more...?

boogara

Quote from: jj2007 on January 23, 2008, 05:07:14 PM
Quote from: boogara on January 23, 2008, 03:40:56 PM
I use RadASM for my masm programming, so it might be different for you
Nope, it's not different for me, using MASM. It works with handle + 2 points... weird indeed. Hutch might know more...?
Well, in theory, all a point is is an x & y value...so, yeah. XD  Maybe the masm library does the converting of x,y to a single point for us? :D

Makes sense at least XD

Tedd

It's just one of those strange ones where you have to push the whole structure, instead of a pointer to it.
So there are 'two' parameters - the window handle, and the point structure. However, the point structure is just its x and y parts, so both of them go on the stack - at the low level this is no different to pushing the three parameters: hwnd,x,y.
No snowflake in an avalanche feels responsible.