DwmApiDwmDefWindowProc Method

Default window procedure for Desktop Window Manager (DWM) hit testing within the non-client area.

You also need to ensure that DwmDefWindowProc(IntPtr, UInt32, IntPtr, IntPtr, IntPtr) is called for the WM_NcMouseLeave message.

If DwmDefWindowProc(IntPtr, UInt32, IntPtr, IntPtr, IntPtr) is not called for the WM_NcMouseLeave message, DWM does not remove the highlighting from the Maximize, Minimize, and Close buttons when the cursor leaves the 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", ExactSpelling = true)]
public static bool DwmDefWindowProc(
	IntPtr hwnd,
	uint msg,
	IntPtr wParam,
	IntPtr lParam,
	out IntPtr refResult
)

Parameters

hwnd  IntPtr

[Missing <param name="hwnd"/> documentation for "M:DevCase.Win32.NativeMethods.DwmApi.DwmDefWindowProc(System.IntPtr,System.UInt32,System.IntPtr,System.IntPtr,System.IntPtr@)"]

msg  UInt32
The message to be processed.
wParam  IntPtr
Additional message information. The content of this parameter depends on the value of the msg parameter.
lParam  IntPtr
Additional message information. The content of this parameter depends on the value of the msg parameter.
refResult  IntPtr
A pointer to an LRESULT value that, when this method returns successfully,receives the result of the hit test..

Return Value

Boolean
if DwmDefWindowProc handled the message; otherwise, .

Remarks

See Also