User32UpdateLayeredWindow(SafeHandle, IntPtr, Point, Size, IntPtr, Point, Int32, BlendFunction, UpdateLayeredWindowflags) Method
Updates the position, size, shape, content, and translucency of a layered window.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool UpdateLayeredWindow(
SafeHandle hWnd,
IntPtr hdcDst,
ref Point refPtrDst,
ref Size refSize,
IntPtr hdcSrc,
ref Point refPtrSrc,
int crKey,
ref BlendFunction refBlend,
UpdateLayeredWindowflags flags
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function UpdateLayeredWindow (
hWnd As SafeHandle,
hdcDst As IntPtr,
ByRef refPtrDst As Point,
ByRef refSize As Size,
hdcSrc As IntPtr,
ByRef refPtrSrc As Point,
crKey As Integer,
ByRef refBlend As BlendFunction,
flags As UpdateLayeredWindowflags
) As Boolean
Dim hWnd As SafeHandle
Dim hdcDst As IntPtr
Dim refPtrDst As Point
Dim refSize As Size
Dim hdcSrc As IntPtr
Dim refPtrSrc As Point
Dim crKey As Integer
Dim refBlend As BlendFunction
Dim flags As UpdateLayeredWindowflags
Dim returnValue As Boolean
returnValue = User32.UpdateLayeredWindow(hWnd,
hdcDst, refPtrDst, refSize, hdcSrc,
refPtrSrc, crKey, refBlend, flags)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool UpdateLayeredWindow(
SafeHandle^ hWnd,
IntPtr hdcDst,
Point% refPtrDst,
Size% refSize,
IntPtr hdcSrc,
Point% refPtrSrc,
int crKey,
BlendFunction% refBlend,
UpdateLayeredWindowflags flags
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member UpdateLayeredWindow :
hWnd : SafeHandle *
hdcDst : IntPtr *
refPtrDst : Point byref *
refSize : Size byref *
hdcSrc : IntPtr *
refPtrSrc : Point byref *
crKey : int *
refBlend : BlendFunction byref *
flags : UpdateLayeredWindowflags -> bool
No code example is currently available or this language may not be supported.
- hWnd SafeHandle
-
A handle to a layered window.
A layered window is created by specifying Layered
when creating the window with the CreateWindowEx function
or by setting Layered via SetWindowLongPtr(IntPtr, WindowLongValues, IntPtr) function.
after the window has been created.
- hdcDst IntPtr
-
A handle to a device context (DC) for the screen.
This handle is obtained by specifying NULL when calling the function.
It is used for palette color matching when the window contents are updated.
If hdcDst is Zero, the default palette will be used.
- refPtrDst Point
-
A pointer to a structure that specifies the new screen position of the layered window.
If the current position is not changing, refPtrDst can be Zero.
- refSize Size
-
A pointer to a structure that specifies the new size of the layered window.
If the size of the window is not changing, refSize can be .
If hdcSrc is Zero, refSize must be .
- hdcSrc IntPtr
-
A handle to a device context (DC) for the surface that defines the layered window.
This handle can be obtained by calling the CreateCompatibleDC(IntPtr) function.
If the shape and visual context of the window are not changing, hdcSrc can be Zero.
- refPtrSrc Point
-
A pointer to a structure that specifies the location of the layer in the device context.
If hdcSrc is Zero, pptSrc should be .
- crKey Int32
-
A structure that specifies the color key to be used when composing the layered window.
To generate a COLORREF, use the RGB macro.
- refBlend BlendFunction
-
A pointer to a structure that specifies the transparency value to be used when composing the layered window.
- flags UpdateLayeredWindowflags
-
The flags.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.