Hello,
I've seen the description (in MSDN docs) of UIElement that says: "UIElement can be considered roughly equivalent to a window handle in Microsoft Win32 programming". Maybe I'm taking this too literally, but *could* a UIElement contain another application's window
For example, if you've seen the puzzle sample in the Windows SDK (v6.0\Samples\Demos\15Puzzle\Csharp), they do something pretty cool by splitting up different UIElement objects across the pieces of a puzzle, and scrambling the pieces. They have it working for video, some vector (svg-like) animation, 3D cube animation, and a windows form. I was wondering if it was possible to take this a bit further and show, for example, Microsoft Word or even the command-line prompt on that puzzle.
Thanks!

UIElement containing another application's window?
Deepsteep
Kira_26
Hey Wolf,
I am delighted with your answer!
I tried to move this forward a bit. I couldn't figure out how the puzzle sample actually uses HWndHost or WindowsFormsHost. So I decided to add my own HwndHost as an option to show in the puzzle sample. Well, it's not really my own HwndHost; I just "borrowed" the ControlHost from "Walkthrough: Hosting a Simple Win32 Control in a Windows Presentation Foundation Application" (http://msdn2.microsoft.com/en-us/library/ms752055.aspx). Then I added the following case in Puzzle.xaml.cs:
case "Win32Listbox":
{
FrameworkElement elt = new WPF_Hosting_Win32_Control.ControlHost(700, 500);
_elementToChopUp = elt;
_puzzleSize = new Size(700, 500);
}
break;
However, the listbox doesn't show up. I get no error message, or anything to indicate what went wrong. I stepped through the code and the ControlHost() constructor gets called, but ControlHost.BuildWindowCore() never gets called.
Would you have any advice to help diagnose this
Thanks!