The defects of cross-process parent-child relationship of two windows and possible alternative?

燕鹏 李 301 Reputation points
2022-06-13T10:56:16.783+00:00

I never know it is possbile to build parent-child relationship of two cross-process windows before. Now I know it is possible and it seems its behavior is like the local parent-child replationship. I implemented this a few days ago in Microsoft Word. That custom task pane is the parent of a user control whose child is another window from another process. Only an exception arose, the ribbon tabs cannot response to the mouse envents (mouse hover, mouse click), I have to send the WM_ACTIVATEAPP to the active window (I cannot explain this phenomenon).

But the question is that does that mean I can use this mechanism with peace of mind? Are there some defects in the cross-process parent-child relationship? why no documents in Microsoft Doc? If I don't use this cross-process parent-child relationship windows, is there a better alternative? (for some reasons I asked in the previous posts, I have to implement two cross-process windows, which makes it possible to load two different versions dlls).

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,728 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RLWA32 46,861 Reputation points
    2022-06-13T11:21:45.05+00:00

    You may find this to be informative - Is it legal to have a cross-process parent/child or owner/owned window relationship?.

    I suggest you reconsider your decision to not pursue using activation contexts to load two different versions of a dll into the same process.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.