C
C#3y ago
danilwhale

insert other application window to my main window

hellooooo! to be short, i want to insert other application window (ex. notepad) to my window, maybe this is not possible, but then ill be know this in future! :)
4 Replies
Jester
Jester3y ago
It's very easy, if you have your window handle, and the window handle of the window you want in yours (which is called a child window). One way to do it is with these 2 functions you have to PInvoke. https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindoww https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setparent Find the window you want as a child by its title, null for the class name. Then use the window handle to set your window as its parent.
danilwhale
danilwhaleOP3y ago
oh guy thanks i know that it needs handle i worked with ui on xna like this :)
Jester
Jester3y ago
it might not always work or work as you espect though
danilwhale
danilwhaleOP3y ago
ok anyways thanks

Did you find this page helpful?