public static void UpdateLayeredWindow(IntPtr hwnd, Standard.SafeDC hdcDst, ref Standard.POINT pptDst, ref Standard.SIZE psize, Standard.SafeDC hdcSrc, ref Standard.POINT pptSrc, int crKey, ref Standard.BLENDFUNCTION pblend, Standard.ULW dwFlags) { if (!_UpdateLayeredWindow(hwnd, hdcDst, ref pptDst, ref psize, hdcSrc, ref pptSrc, crKey, ref pblend, dwFlags)) { Standard.HRESULT.ThrowLastError(); } }
/// <summary> /// Try to get the relative mouse position to the given handle in client coordinates. /// </summary> /// <param name="hWnd">The handle for this method.</param> public static bool TryGetRelativeMousePosition(IntPtr hWnd, out System.Windows.Point point) { Standard.POINT pt = new Standard.POINT(); var returnValue = hWnd != IntPtr.Zero && Standard.NativeMethods.TryGetPhysicalCursorPos(out pt); if (returnValue) { Standard.NativeMethods.ScreenToClient(hWnd, ref pt); point = new System.Windows.Point(pt.x, pt.y); } else { point = new System.Windows.Point(); } return(returnValue); }
private static extern bool _UpdateLayeredWindow(IntPtr hwnd, Standard.SafeDC hdcDst, [In] ref Standard.POINT pptDst, [In] ref Standard.SIZE psize, Standard.SafeDC hdcSrc, [In] ref Standard.POINT pptSrc, int crKey, ref Standard.BLENDFUNCTION pblend, Standard.ULW dwFlags);