SendMessage scrolling doesn't work in MS Word with found SPY++ handle

214 views Asked by At

I want to simulate mouse actions as scrolling by SendMessage for opened applications i.e. Chrome, Word etc. I need some functionality like in X-Mouse Control or AHK. I checked the handles with SPY++ and it works, if i take the found handle of Chrome. Why is it not working with the word handles, shouldn't it? (I checked them all in my code.)

Word handles:

SPY++ found Word handles

My code:

e.Handled = true;

int handle = int.Parse("004A0618", NumberStyles.AllowHexSpecifier);

SendMessage((IntPtr)handle , WM_SCROLL, (IntPtr)SB_PAGELEFT, IntPtr.Zero);

Sadly i can't log messages with SPY++ in several application like Office and Chrome with the Finder. It works in IE. As suggested it also doesn't work, if i start and stop the logging. Nothing appears. The "All Windows in System" option works but i can't figure it out what i have to filter. Nothing when i search for "Scroll" etc.

Would it make a difference if i use mouse_event/SendInput? (I tried to implement it but it always let my VS crash.)

0

There are 0 answers