Note: if you are using Dual monitor with VISTA, there is a problem if you move the skinned window to the second monitor.
To fix the Dual monitor mouse location problem, replace in the source code all reference to
LOWRD(lParam), HIWRD(lParam)
with
LO(
INTEGER, lParam), HI(
INTEGER, lParam)
to get a signed value instead of the unsigned WORD.
'// Monitor Windows DEF PROC to take over HITTEST detection
FUNCTION zDefWindowProc(BYVAL hWnd AS LONG, BYVAL Msg AS LONG, BYVAL wParam AS LONG, BYVAL lParam AS LONG) AS LONG LOCAL nRet, HITTEST AS LONG
LOCAL rc AS RECT
nRet = DefWindowProc(hWnd, Msg, wParam, lParam)
IF Msg = %WM_NCHITTEST THEN
LOCAL p AS POINTAPI
LOCAL CaptionHeight AS LONG
CALL zGetImageSize(zGetProperty(hWnd, %FORM_TopMid), 0, CaptionHeight)
p.X = LO(INTEGER, lParam): p.Y = HI(INTEGER, lParam) CALL ScreenToClient(hWnd, p)
IF IsZoomed(hWnd) = 0 THEN
IF nRet = %HTCLIENT THEN
HITTEST = %HTCAPTION
IF SK_DRAG_BACKGROUND() = 0 THEN
IF p.Y > CaptionHeight AND CaptionHeight > 0 THEN
HITTEST = %HTNOWHERE
IF hWnd <> GetForegroundWindow THEN CALL SetFocus(hWnd)
END IF
END IF