4 using System.Runtime.InteropServices;
6 using System.Windows.Interop;
8 using SiliconStudio.Presentation.Extensions;
10 namespace SiliconStudio.Presentation.Controls
14 private readonly IntPtr childHandle;
15 private Rect previousBoundingBox;
19 this.childHandle = childHandle;
24 int style = NativeHelper.GetWindowLong(childHandle, NativeHelper.GWL_STYLE);
27 style |= NativeHelper.WS_CHILD;
29 NativeHelper.SetWindowLong(childHandle, NativeHelper.GWL_STYLE, style);
30 NativeHelper.ShowWindow(childHandle, NativeHelper.SW_HIDE);
32 NativeHelper.SetParent(childHandle, hwndParent.Handle);
34 var hwnd =
new HandleRef(
this, childHandle);
40 if (previousBoundingBox != rcBoundingBox)
42 base.OnWindowPositionChanged(rcBoundingBox);
43 previousBoundingBox = rcBoundingBox;
49 NativeHelper.SetParent(childHandle, IntPtr.Zero);
override void OnWindowPositionChanged(Rect rcBoundingBox)
GameEngineHwndHost(IntPtr childHandle)
override void DestroyWindowCore(HandleRef hwnd)
override HandleRef BuildWindowCore(HandleRef hwndParent)