Click here to Skip to main content
15,917,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading a file from disk in C Pin
Electron Shepherd18-Jan-10 3:43
Electron Shepherd18-Jan-10 3:43 
GeneralRe: The _stat function Pin
Danzy8318-Jan-10 3:56
Danzy8318-Jan-10 3:56 
GeneralRe: The _stat function Pin
Electron Shepherd18-Jan-10 3:59
Electron Shepherd18-Jan-10 3:59 
GeneralThanks CPallini and Covean Pin
Danzy8318-Jan-10 3:53
Danzy8318-Jan-10 3:53 
GeneralRe: Thanks CPallini and Covean Pin
CPallini18-Jan-10 6:56
mveCPallini18-Jan-10 6:56 
GeneralRe: Thanks CPallini and Covean Pin
Rozis18-Jan-10 11:32
Rozis18-Jan-10 11:32 
AnswerRe: Reading a file from disk in C PinPopular
Joe Woodbury18-Jan-10 7:14
professionalJoe Woodbury18-Jan-10 7:14 
QuestionUsing Zend library in vc++ Pin
Ash_VCPP18-Jan-10 3:02
Ash_VCPP18-Jan-10 3:02 
AnswerRe: Using Zend library in vc++ Pin
Frank Seidler18-Jan-10 8:44
Frank Seidler18-Jan-10 8:44 
GeneralRe: Using Zend library in vc++ Pin
Ash_VCPP20-Jan-10 1:59
Ash_VCPP20-Jan-10 1:59 
Questionarray of differents types (possible?) Pin
George Nistor18-Jan-10 2:28
George Nistor18-Jan-10 2:28 
QuestionRe: array of differents types (possible?) Pin
CPallini18-Jan-10 2:44
mveCPallini18-Jan-10 2:44 
AnswerRe: array of differents types (possible?) Pin
George Nistor18-Jan-10 20:57
George Nistor18-Jan-10 20:57 
GeneralRe: array of differents types (possible?) Pin
CPallini18-Jan-10 21:05
mveCPallini18-Jan-10 21:05 
GeneralRe: array of differents types (possible?) Pin
George Nistor18-Jan-10 22:48
George Nistor18-Jan-10 22:48 
Generalthx, SOLVED Pin
George Nistor21-Jan-10 3:38
George Nistor21-Jan-10 3:38 
Questionarray of diffrent types - still not usefull Pin
George Nistor21-Jan-10 5:20
George Nistor21-Jan-10 5:20 
QuestionRe: array of diffrent types - still not usefull Pin
CPallini21-Jan-10 7:42
mveCPallini21-Jan-10 7:42 
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 
Rajesh R Subramanian wrote:
I just looked what the DoEvents call does and it looks functionally similar to the loop you've written. But it's just that in this case you're translating and dispatching the messages yourselves, but in the VB case you'll be transferring control to the OS and it does the thing for you.


This is not true: even in VB, the VB-runtime does the thing for you and not the OS.

What happens is that the message-queue is dispatched till it is empty. From that point Windows can give its time to others. 'Transferring control to the OS" then means giving the time you don't need because the queue is empty, back to the OS.

Rajesh R Subramanian wrote:
If you're going to use such a loop in your code, you may want to consider using a worker thread instead (but that really depends on what exactly are you trying to achieve).


Actually that would make things worse: every thread has its own message-queue.

Rozis

modified on Monday, January 18, 2010 5:56 PM

GeneralRe: PeekMessage and DoEvents Pin
Rajesh R Subramanian18-Jan-10 19:15
professionalRajesh R Subramanian18-Jan-10 19:15 

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.