I'm trying to make a UserControl that I can use as the frame of an unmanaged window using a 3rd party unmanaged library.
The libary has a call where I pass it an HWND and a RECT, and it will make a child window for displaying it's content. Back when using windows forms, I had this working just fine. Now I'm attempting to do the same thing in WPF.
I can see how to get the window handle of the parent window... I use the WindowInteropHelper class and pass it's constructor the "this" of my window. But I can't find anything like that for a UserControl. I've checked to make sure that if I use the window as the target for the unmanaged content's parent, that it works, so now I've just got to find a way to get this in a control.
I have one goal here:
1. Make a UserControl that I can use as the target for my lib's functionality, so I can use it as a viewer of this special content.
The motivation for this goal is that I am creating the complete functionality for my application as content creation/manipulation classes, so that a designer using expression blend will be able to completely do the UI on their own. The only thing stopping me from finishing this right now is that I need a way for the UI designer to place and configure a specialized content window that meets the requirement of binding with the aforementioned library.
Thanks,
Jim Tomasko