Threads
-
Hi, I read in some book, that every modal dialog based application, creates two message loops, one for caller and other for dialog box itself. Is this correct?? If so, how it is implemented?? How many threads (UI or worker) theads does the SDI & MDI application have?? Thanks and Regards, Satya
-
Hi, I read in some book, that every modal dialog based application, creates two message loops, one for caller and other for dialog box itself. Is this correct?? If so, how it is implemented?? How many threads (UI or worker) theads does the SDI & MDI application have?? Thanks and Regards, Satya
From my knowledge and the books that i have read, there is always one message loop / thread. by default there is one thread/sdi or mdi or dialog so only one message loop. worker initially does not have a message loop. Message loop is created dynamically by windows only when that thread needs one.
MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"
-
From my knowledge and the books that i have read, there is always one message loop / thread. by default there is one thread/sdi or mdi or dialog so only one message loop. worker initially does not have a message loop. Message loop is created dynamically by windows only when that thread needs one.
MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"
Yes that absoutely correct Mr.Prakash. U don't have to go long way. Just read Threading in Jeffery Richter book. It has all in it. cheers! siddharth
-
Yes that absoutely correct Mr.Prakash. U don't have to go long way. Just read Threading in Jeffery Richter book. It has all in it. cheers! siddharth
Yeah i have that book :-)
MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"
-
Hi, I read in some book, that every modal dialog based application, creates two message loops, one for caller and other for dialog box itself. Is this correct?? If so, how it is implemented?? How many threads (UI or worker) theads does the SDI & MDI application have?? Thanks and Regards, Satya
You can have as many message loops in your thread as you wish. I commonly have three or four. Another question is how many message queues can a thread have. The answer to that is only one. When you display a dialog (using standard Windows), it uses it's own internal message loop to process the message while your main application has the primary message loop used for normal processing. Often, when an application needs to process messages during an operation that will take a lot of time, another message loop is used to pump the messages from the message queue. So as you can see, you can have many message loops. But you usually only worry about the primary message loop. Tim Smith I'm going to patent thought. I have yet to see any prior art.
-
From my knowledge and the books that i have read, there is always one message loop / thread. by default there is one thread/sdi or mdi or dialog so only one message loop. worker initially does not have a message loop. Message loop is created dynamically by windows only when that thread needs one.
MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"
-
What you said is true for message queues, not message loops. You can have many message loops. Each thread can only have one message queue. Tim Smith I'm going to patent thought. I have yet to see any prior art.
yeah, in my application also there is one main message loop and few other make shift message loop.
MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"
-
You can have as many message loops in your thread as you wish. I commonly have three or four. Another question is how many message queues can a thread have. The answer to that is only one. When you display a dialog (using standard Windows), it uses it's own internal message loop to process the message while your main application has the primary message loop used for normal processing. Often, when an application needs to process messages during an operation that will take a lot of time, another message loop is used to pump the messages from the message queue. So as you can see, you can have many message loops. But you usually only worry about the primary message loop. Tim Smith I'm going to patent thought. I have yet to see any prior art.
When you display a dialog (using standard Windows), it uses it's own internal message loop to process the message while your main application has the primary message loop used for normal processing. Hi Tim, Is this the case with both Modal and Modeless Dialog Boxes ?? How it is actually implemented?? What are the classes involved in doing this?? How we can create multiple message loops and link them with the application. Regards Satya