Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
/SharpDXPublic archive

Commit6221710

Browse files
authored
Add missing method to create Target fromDevice
This is method is the only way to create a Target in Windows 8, which doesn't have `DesktopDevice`. And this method is unfortuately missing.
1 parentaed636b commit6221710

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎Source/SharpDX.DirectComposition/Target.cs‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,17 @@ public static Target FromHwnd(DesktopDevice desktopDevice, IntPtr hwnd, bool top
1818
{
1919
returndesktopDevice.CreateTargetForHwnd(hwnd,topmost);
2020
}
21+
22+
/// <summary>
23+
/// Creates a composition target object that is bound to the window that is represented by the specified window handle.
24+
/// </summary>
25+
/// <param name="device">A device the target is to be associated with.</param>
26+
/// <param name="hwnd">The window to which the composition object will be bound. This cannot be null.</param>
27+
/// <param name="topmost">TRUE if the visual tree should be displayed on top of the children of the window specified by the hwnd parameter; otherwise, the visual tree is displayed behind the children.</param>
28+
/// <returns></returns>
29+
publicstaticTargetFromHwnd(Devicedevice,IntPtrhwnd,booltopmost)
30+
{
31+
returndevice.CreateTargetForHwnd(hwnd,topmost);
32+
}
2133
}
2234
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp