0

I have two separate apps A.exe and B.exe, which results into two independent top level windows. Both are C++ Apps and uses win32 gui framework on windows platform. I want to combine these to a new app C.exe such that it shows the two in separate tabs in a multi tab dialog.

Baiscaly how to set Dialog Dlg1 in C.exe as parent window to A.exe's(Top Level Window) or in other way how to load A.exe(Top level Window) as a child window in Dlg1 in C.exe

Is there any solution to it using win32 or MFC? Or it is not possible?

Faqir Aamir
  • 59
  • 10

1 Answers1

2

If C.exe spawns A.exe and B.exe, it could pass its own HWND as a command-line parameter, then A.exe and B.exe can retreive that parameter and use that HWND as the parent window in calls to CreateWindow/Ex() or SetParent() whenever needed. Otherwise, C.exe will have to use FindWindow/Ex() or EnumWindows() to manually find the HWND handles of A.exe and B.exe and then call SetParent() on them.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770