Click here to Skip to main content
15,894,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: array of diffrent types - still not usefull Pin
George Nistor21-Jan-10 19:26
George Nistor21-Jan-10 19:26 
QuestionPeekMessage and DoEvents Pin
HakunaMatada18-Jan-10 2:17
HakunaMatada18-Jan-10 2:17 
AnswerRe: PeekMessage and DoEvents Pin
Covean18-Jan-10 2:33
Covean18-Jan-10 2:33 
AnswerRe: PeekMessage and DoEvents Pin
Cedric Moonen18-Jan-10 3:01
Cedric Moonen18-Jan-10 3:01 
AnswerRe: PeekMessage and DoEvents Pin
Rajesh R Subramanian18-Jan-10 8:49
professionalRajesh R Subramanian18-Jan-10 8:49 
GeneralRe: PeekMessage and DoEvents [modified] Pin
Rozis18-Jan-10 11:49
Rozis18-Jan-10 11:49 
GeneralRe: PeekMessage and DoEvents Pin
Rajesh R Subramanian18-Jan-10 19:15
professionalRajesh R Subramanian18-Jan-10 19:15 
GeneralRe: PeekMessage and DoEvents Pin
Rozis19-Jan-10 2:17
Rozis19-Jan-10 2:17 
<blockquote class="FQ"><div class="FQA">Rajesh R Subramanian wrote:</div>While I know nothing about VB, this is from the docs of the said function: DoEvents passes control to the operating system. Control is returned after the operating system has finished processing the events in its queue and all keys in the SendKeys queue have been sent. So, the documentation could be wrong.</blockquote>

The documentation is not wrong. It states exactly - in other words - my point.


<blockquote class="FQ"><div class="FQA">Rajesh R Subramanian wrote:</div>What an ignorant statement! Every thread won't have its own message queue. A thread will have a message queue only if it's an UI thread! </blockquote>

I'm sorry: of course you are right. But the problem was: is it a good idea to move the dispatcher to another thread. I think not because 1) there's not performance gain, 2) it complicates the dispatcher, and 3) if he makes a mistake it's reading the wrong message-queue.

The initial question was: is the dispatcher written equivalent to the VB DoEvents. In my opinion it is an exact copy. I believe in this situation introducing an extra thread has no meaning, but i'll be pleased to be convinced by you. The statement was not a lack of knowledge from my side but I thought your answer got of the track of the initial question. I'm really sorry if i offended you: that was not my intention.

As Pallini pointed out: although threads will not initially have a message-queue, they will if you use any of the message-functions. So my question to you is how would you create a thread with a dispatcher that dispatches the message-queue of another thread? I simply don't get it. If you move the code of the dispatcher to another thread it will dipatch the thread's queue and not the queue of your main program.

Rozis
GeneralRe: PeekMessage and DoEvents Pin
CPallini18-Jan-10 20:58
mveCPallini18-Jan-10 20:58 
Questionwin32 dialog Pin
john563218-Jan-10 1:58
john563218-Jan-10 1:58 
AnswerRe: win32 dialog Pin
Abhi Lahare18-Jan-10 6:16
Abhi Lahare18-Jan-10 6:16 
QuestionThreading Pin
HakunaMatada18-Jan-10 1:48
HakunaMatada18-Jan-10 1:48 
AnswerRe: Threading Pin
Cedric Moonen18-Jan-10 2:08
Cedric Moonen18-Jan-10 2:08 
GeneralRe: Threading Pin
HakunaMatada18-Jan-10 2:11
HakunaMatada18-Jan-10 2:11 
AnswerRe: Threading Pin
Moak18-Jan-10 3:34
Moak18-Jan-10 3:34 
GeneralRe: Threading Pin
HakunaMatada19-Jan-10 1:26
HakunaMatada19-Jan-10 1:26 
QuestionClose A DIalog Pin
john563218-Jan-10 0:58
john563218-Jan-10 0:58 
AnswerRe: Close A DIalog Pin
Code-o-mat18-Jan-10 1:25
Code-o-mat18-Jan-10 1:25 
GeneralRe: Close A DIalog Pin
john563218-Jan-10 1:29
john563218-Jan-10 1:29 
QuestionThread paused Pin
susanne117-Jan-10 23:56
susanne117-Jan-10 23:56 
QuestionRe: Thread paused Pin
CPallini18-Jan-10 0:16
mveCPallini18-Jan-10 0:16 
AnswerRe: Thread paused Pin
susanne118-Jan-10 0:50
susanne118-Jan-10 0:50 
GeneralRe: Thread paused Pin
CPallini18-Jan-10 0:58
mveCPallini18-Jan-10 0:58 
AnswerRe: Thread paused Pin
Covean18-Jan-10 0:59
Covean18-Jan-10 0:59 
QuestionRe: Thread paused Pin
CPallini18-Jan-10 1:39
mveCPallini18-Jan-10 1:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.