DwmApiDwmSetWindowAttribute(IntPtr, DwmWindowAttribute, IntPtr, UInt32) Method

Sets the value of non-client rendering attributes for a window.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("DwmApi.dll")]
public static int DwmSetWindowAttribute(
	IntPtr hWnd,
	DwmWindowAttribute attributeToSet,
	IntPtr attributeValue,
	uint attributeSize
)

Parameters

hWnd  IntPtr
The handle to the window that will receive the attributes.
attributeToSet  DwmWindowAttribute
A single DwmWindowAttribute flag to apply to the window.

This parameter specifies the attribute and the attributeValue parameter points to the value of that attribute.

attributeValue  IntPtr
A pointer to the value of the attribute specified in the attributeToSet parameter.

Note that different DwmWindowAttribute flags require different value types.

attributeSize  UInt32
The size, in bytes, of the value type pointed To by the attributeValue parameter.

Return Value

Int32
If this function succeeds, it returns S_OK. Otherwise, it returns an HResult error code.

Remarks

See Also