C# Class AdvancedLauncher.Tools.Interop.HwndHostEx

This class works around issues with the HwndHost in current WPF versions.
Inheritance: System.Windows.Interop.HwndHost, IKeyboardInputSink
Afficher le fichier Open project: GoldRenard/DMOAdvancedLauncher

Méthodes publiques

Свойство Type Description
AsyncUpdateWindowPosProperty System.Windows.DependencyProperty
CopyBitsBehaviorProperty System.Windows.DependencyProperty
RaiseMouseActivateCommandProperty System.Windows.DependencyProperty

Méthodes protégées

Méthode Description
BuildWindowCore ( HandleRef hwndParent ) : HandleRef
BuildWindowOverride ( HWND hwndParent ) : HWND

Default implementation of BuildWindowOverride, which just creates a simple "STATIC" HWND. This is almost certainly not the desired window, but at least something shows up on the screen. Override this method in your derived class and build the window you want.

DestroyWindowCore ( HandleRef hwnd ) : void
DestroyWindowOverride ( HWND hwnd ) : void

Default implementation of DestroyWindowCore, which just destroys the hosted window. If this is undesirable, override this method and provide alternative logic.

OnWindowPositionChanged ( Rect rcBoundingBox ) : void

WndProc ( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr
WndProcOverride ( HWND hwnd, WM msg, IntPtr wParam, IntPtr lParam ) : IntPtr

Method Details

BuildWindowCore() protected final méthode

protected final BuildWindowCore ( HandleRef hwndParent ) : HandleRef
hwndParent System.Runtime.InteropServices.HandleRef
Résultat System.Runtime.InteropServices.HandleRef

BuildWindowOverride() protected méthode

Default implementation of BuildWindowOverride, which just creates a simple "STATIC" HWND. This is almost certainly not the desired window, but at least something shows up on the screen. Override this method in your derived class and build the window you want.
protected BuildWindowOverride ( HWND hwndParent ) : HWND
hwndParent AdvancedLauncher.Tools.Win32.User32.HWND
Résultat AdvancedLauncher.Tools.Win32.User32.HWND

DestroyWindowCore() protected final méthode

protected final DestroyWindowCore ( HandleRef hwnd ) : void
hwnd System.Runtime.InteropServices.HandleRef
Résultat void

DestroyWindowOverride() protected méthode

Default implementation of DestroyWindowCore, which just destroys the hosted window. If this is undesirable, override this method and provide alternative logic.
protected DestroyWindowOverride ( HWND hwnd ) : void
hwnd AdvancedLauncher.Tools.Win32.User32.HWND
Résultat void

OnWindowPositionChanged() protected méthode

protected OnWindowPositionChanged ( Rect rcBoundingBox ) : void
rcBoundingBox System.Windows.Rect
Résultat void

WndProc() protected final méthode

protected final WndProc ( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool &handled ) : IntPtr
hwnd System.IntPtr
msg int
wParam System.IntPtr
lParam System.IntPtr
handled bool
Résultat System.IntPtr

WndProcOverride() protected méthode

protected WndProcOverride ( HWND hwnd, WM msg, IntPtr wParam, IntPtr lParam ) : IntPtr
hwnd AdvancedLauncher.Tools.Win32.User32.HWND
msg WM
wParam System.IntPtr
lParam System.IntPtr
Résultat System.IntPtr

Property Details

AsyncUpdateWindowPosProperty public_oe static_oe property

Specifies whether or not to set the window position of the hosted window asynchronously.
HwndHost depends on the LayoutUpdated event to synchronize the position of the HWND with the layout slot. However, when WPF gets into a recursive/nested layout loop, the LayoutUpdated event is not raised. Since we resize the hosted HWND in response to this event, if the hosted HWND contains an HwndSource, that HwndSource will run an immediate layout pass, but the LayoutUpdated event will not be raised. TODO: fix in 4.5?
public static DependencyProperty,System.Windows AsyncUpdateWindowPosProperty
Résultat System.Windows.DependencyProperty

CopyBitsBehaviorProperty public_oe static_oe property

The behavior for handling of the SWP_NOCOPYBITS flag during moving or sizing operations.
Real implementation is HwndHostExtensions.CopyBitsBehaviorProperty
public static DependencyProperty,System.Windows CopyBitsBehaviorProperty
Résultat System.Windows.DependencyProperty

RaiseMouseActivateCommandProperty public_oe static_oe property

Specifies whether or not a HwndHostCommands.MouseActivate command is raised in response to WM_MOUSEACTIVATE.
Real implementation is HwndHostExtensions.RaiseMouseActivateCommandProperty
public static DependencyProperty,System.Windows RaiseMouseActivateCommandProperty
Résultat System.Windows.DependencyProperty