Sean wrote:
meaning that the following is merely another way of saying that
lParam is a (ByVal)
POINTS struct, in essence, as
lParam is of
INT32/64 for a
32/64-bit app.
So, use
Code:
(x & 0xFFFF) | (y & 0xFFFF) << 16
Although
^ will produce identical results as with
| in this case, I recommend
| over
^.
gotcha thanks
Sean wrote:
guest3456 wrote:
even passing the correct lParam is still giving my vista/win7 users using Aero problems, the window is getting resized to the minimum width or something stupid and i'm on XP so cant really debug.
Actually I'm on 64-bit Win7 (Ultimate) with Aero on, and I just tested and there was no problem in resizing the window (:even if I just used 0 as lParam).
blah wtf

are you sending the LBUTTONUP as well? heres exactly what i'm doing:
Code:
f1::
MouseGetPos,,, win
WinMove, ahk_id %win%,,,, 853, 615
PostMessage, 0xA1, 11, 0, , ahk_id%win%
;WM_NCLBUTTONDOWN = 0xA1
;HTRIGHT = 11 (right border)
PostMessage, 0x202, 0, 0, , ahk_id%win%
;WM_LBUTTONUP = 0x202
return
then users were reporting that tables were getting sized small, which i suspected was due to sending 0 to lParam (coord 0x0 ?) so then i've tried sending the coord to each message, which caused this whole thread:
Code:
f2::
SysGet, xborder, 32
SysGet, yborder, 33
SysGet, caption, 4
MouseGetPos,,, win
WinMove, ahk_id %win%,,,, 853, 615
sleep, 100
WinGetPos, xx, yy, ww, hh, ahk_id %win%
borderpoint_client_x := ww-xborder-2
borderpoint_client_y := 20
borderpoint_screen_x := xx+xborder+borderpoint_client_x
borderpoint_screen_y := yy+yborder+caption+borderpoint_client_y
;msgbox, xboC=%borderpoint_client_x%`nyboC=%borderpoint_client_y%`nxboS=%borderpoint_screen_x%`nyboS=%borderpoint_screen_y%
WM_NCLBUTTONDOWN := 0xA1 ;http://msdn.microsoft.com/en-us/library/ms645620%28VS.85%29.aspx
HTLEFT := 10
HTRIGHT := 11 ;right border
HTBOTTOMRIGHT := 17
PostMessage, WM_NCLBUTTONDOWN, HTRIGHT, borderpoint_screen_x|borderpoint_screen_y<<16, , ahk_id%win%
WM_LBUTTONUP := 0x202
PostMessage, WM_LBUTTONUP, 0, ((borderpoint_client_y<<16)^borderpoint_client_x), , ahk_id%win%
return
then i was getting reports of minsizes and other random sizes, related to where in the window the mouse cursor is when they press the hotkey. mouse on right side of window leads to minsize, mouse on left size resizes bigger. (which leads me to my original assumption relating to mouse cursor location, but apparently sending these coords isnt fixing it)
and once my one tester turns on Basic mode with no Aero, all these codes work

(so maybe its not doing some other mouse pos check in basic?)
so it seems for now i'm gonna have to do some BS like:
Code:
MouseGetPos, oldx, oldy, win
Click %x%, %y%
MouseMove, %oldx%, %oldy%, 0