How to place an application window as a child of a window belonging to another process?

I would like to place the application window from process "A" in the main window of process "B", just as if window "A" was an MDI child window. Is this possible on Windows? Or are there some tricks that would allow me to fake this?

By the way, I would like to remove the title bar (or, even better, all non-client ones) of window "A" when it is embedded in window "B". I believe this should be possible by customizing window styles or window classes, but I am by no means an expert in these intricacies of Win32.

+3
source share
1 answer

You can place a window. Change the parent HWND by calling the SetParent function against it. To change window styles, you need to use the GetWindowLong / SetWindowLong pair to change the attributes that you want to disable.

If this is a third-party application (i.e. not yours), then you are probably on a rough trip, especially if there is any theme in the window or something in your window (for example, changes in the drag and drop area, etc. .).

+2
source

Source: https://habr.com/ru/post/1702840/


All Articles