Mat

WinAPI Trigger Aerosnap

3 posts in this topic

Aerosnap, or whatever it's called nowadays with win10, is something I'd like to use from a program, but without having to go the ugly route of moving the mouse.

Looking through the window messages from Spy++, there seems to be an extra flag in WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED, with a value of 0x00100800 or 0x00100000, which I can only see when moving a window with the snapping. If I call SetWindowPos with those flags it returns Invalid Flags.

I haven't even started looking at trying to make the window narrower while still snapped...

I wouldn't be surprised if it's not in the messages to the window at all, but I am surprised I can't find any reference to it at all on MSDN, or even any good answers on SO. 

Mat

Share this post


Link to post
Share on other sites



I read some time ago. that Microsoft  has no implemented API for that (at least no visible for third developers)

If I understand what you want.

I think no need to use mouse move. maybe using send for example Send("#{LEFT}") 

Saludos

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Yep, I very quickly reached the conclusion there was no api. I was hoping to find that they were just using undocumented window messages, or undocumented flags within existing messages. Neither appears to be the case.

Win-left and right is a very good suggestion though thanks. Didn't know about those hotkeys but they do the trick.

Still, would have been nice to do it programmatically. 

Edited by Mat

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now