Home > Software engineering >  Child window card parent window resurrected
Child window card parent window resurrected

Time:09-29

Send a problem, we discuss, see how can break?
1. The parent window in the main thread of a process of
2. The child window in the child process a thread
Child Windows in the thread after receiving orders, into an infinite loop, the parent window followed dead
How to deal with the child window stuck and don't let the main window also follow card dead? Or how to deal with child Windows stuck to the revival of the main window can be?

CodePudding user response:

Remove a parent-child relationship, you go you highway, I had my wooden bridge


Actually I'm guff, waiting for reply, learning

CodePudding user response:

Different processes should not be jammed, unless you parent window waiting for what child window message, because the child window card to death, so the parent window have been waiting for

CodePudding user response:

Is to lift the father-son relationship, but also remove the input queue of the thread, I tried, relationships can normal lifted, but the main window will still be stuck, such as the main window of the maximize button will be no response, how can completely remove relationship?

CodePudding user response:

Oyljerry hello, can you talk about?

CodePudding user response:

Check the MSDN is one of the Windows programmer must master the skills,
http://msdn.microsoft.com/zh-cn/library/ms810439.aspx

CodePudding user response:

Solution under the zhao4zhong1 can say?

CodePudding user response:

No such played,
You feel different processes message loop, should be not jammed,

CodePudding user response:

This problem should be attributed to the LZ is how to make the child window card dead on this issue

CodePudding user response:

I think we should focus on solving the problem child window card dead, this kind of a ring set of a ring, you don't solve the child window, to solve the problem of the parent window, was bugs is passed,

CodePudding user response:

To solve infinite loop, because some infinite loop will steal all the machine into a monopoly, leading to system crash, the death of the normal cycle is to release resources, at the moment is not in the same thread of the main program should not happen to crash, or that there are serious errors, process

CodePudding user response:

If the main window and the child window no logical dependencies, then because they are in different threads, and they all have their own news cycle, according to the principle that should be no longer window stuck to influence the situation of the main window, unless it is both a logical dependencies, such as: child window function called main window, and infinite loop in the child window function, leading to the main window and root card, otherwise impossible, even dependent child window messages or events will not result in the main window card dead,

CodePudding user response:

If there are any interoperability between father and son?

CodePudding user response:

Window is not each other, father and son in theory to solve after father-son relationship should not dead, but the fact proved that indeed there are still problems, and I use MFC to write a simple Demo verified this problem, this is a technical problem, the current Internet explorer has done it and Internet explorer is the main interface and the page area window in different threads, when the page is jammed, main interface still raised up, IE is thoroughly solved the window parent-child relationships, above some people say that should solve the problems of the child window card dead, this is not to need to solve, I throw this problem is to solve the child window when stuck to the revival of the main window, there is still no one can give me the right answer

CodePudding user response:

Window is not each other, father and son in theory to solve after father-son relationship should not dead, but the fact proved that indeed there are still problems, and I use MFC to write a simple Demo verified this problem, this is a technical problem, the current Internet explorer has done it and Internet explorer is the main interface and the page area window in different threads, when the page is jammed, main interface still raised up, IE is thoroughly solved the window parent-child relationships, above some people say that should solve the problems of the child window card dead, this is not to need to solve, I throw this problem is to solve the child window when stuck to the revival of the main window, there is still no one can give me the right answer

CodePudding user response:

I also in research on this question, did the current IE browser with QQ, don't know for so long, the building has been resolved?

CodePudding user response:

1. The parent window in the main thread of a process of
2. The child window in the child process a thread //is founded by child window thread? Based on the description of the original poster is certainly not founded by the child thread
Child Windows in the thread after receiving orders, into an infinite loop, the parent window followed dead //if the child window is a child thread created, the main thread is not jammed
How to deal with the child window stuck and don't let the main window also follow card dead? Or how to deal with child Windows stuck to the revival of the main window can be?
More 0

CodePudding user response:

Suggestion:
Don't create child in other parts of the main window OnCreate or window
Create a child window there should be a thread function

CodePudding user response:

Mark encountered the same problem

CodePudding user response:

Multiple Threads in the User Interface of http://msdn.microsoft.com/zh-cn/library/ms810439.aspx

CodePudding user response:

reference leilei_zong reply: 3/f
is to lift the father-son relationship, but also remove the input queue of the thread, I tried, relationships can normal lifted, but the main window will still be stuck, such as the main window of the maximize button will be no response, how can completely remove relationship?


Me too, the child collapse does not affect the parent, the child stuck a parent is jammed
  • Related