Click here to Skip to main content
15,916,702 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Open Text File into Hexadecimal Pin
mzakarni15-Sep-02 2:39
mzakarni15-Sep-02 2:39 
GeneralLogical bug in program Pin
axa14-Sep-02 22:20
axa14-Sep-02 22:20 
GeneralRe: Logical bug in program Pin
Hans Ruck15-Sep-02 5:54
Hans Ruck15-Sep-02 5:54 
GeneralRe: Logical bug in program Pin
axa15-Sep-02 10:44
axa15-Sep-02 10:44 
QuestionCan't a message be peeked in a thread? Pin
Chen Jiadong14-Sep-02 22:04
Chen Jiadong14-Sep-02 22:04 
AnswerRe: Can't a message be peeked in a thread? Pin
Neville Franks14-Sep-02 22:52
Neville Franks14-Sep-02 22:52 
GeneralRe: Can't a message be peeked in a thread? Pin
Chen Jiadong15-Sep-02 1:55
Chen Jiadong15-Sep-02 1:55 
GeneralRe: Can't a message be peeked in a thread? Pin
Neville Franks15-Sep-02 2:16
Neville Franks15-Sep-02 2:16 
You could use clock().
eg. Before the while loop: clock_t StartTime = clock();
Then in the loop: if ( ( clock() - StartTime ) > MaxWait ) ...

It would be better still if the worker thread didn't have to waist time and CPU cycles in this loop though. Typically worker threads use WaitForxxx for some event to occur, do whatever processing is required, and then either exit or return to the WaitForxxx function.

You might want to look at some of the socket articles here at CP and see how they handle whatever you are trying to do.

Neville Franks, Author of ED for Windows. www.getsoft.com
GeneralRe: Can't a message be peeked in a thread? Pin
Chen Jiadong15-Sep-02 4:24
Chen Jiadong15-Sep-02 4:24 
QuestionHow to print > 1 copies faster? Pin
Hiusing14-Sep-02 17:22
Hiusing14-Sep-02 17:22 
AnswerRe: How to print > 1 copies faster? Pin
Mike Nordell16-Sep-02 0:37
Mike Nordell16-Sep-02 0:37 
GeneralSeparate COLORREF Pin
Steve L.14-Sep-02 13:07
Steve L.14-Sep-02 13:07 
GeneralRe: Separate COLORREF Pin
Piotr Mizera14-Sep-02 13:35
Piotr Mizera14-Sep-02 13:35 
GeneralRe: Separate COLORREF Pin
Steve L.14-Sep-02 13:42
Steve L.14-Sep-02 13:42 
QuestionVS.NET: Compartible with MFC6? Pin
Philip Patrick14-Sep-02 12:47
professionalPhilip Patrick14-Sep-02 12:47 
AnswerRe: VS.NET: Compartible with MFC6? Pin
Anders Molin14-Sep-02 13:10
professionalAnders Molin14-Sep-02 13:10 
AnswerRe: VS.NET: Compartible with MFC6? Pin
Michael Dunn14-Sep-02 15:23
sitebuilderMichael Dunn14-Sep-02 15:23 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Mustafa Demirhan15-Sep-02 21:01
Mustafa Demirhan15-Sep-02 21:01 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Michael Dunn16-Sep-02 3:48
sitebuilderMichael Dunn16-Sep-02 3:48 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Mustafa Demirhan16-Sep-02 7:13
Mustafa Demirhan16-Sep-02 7:13 
AnswerRe: VS.NET: Compartible with MFC6? Pin
Pavel Klocek14-Sep-02 21:37
Pavel Klocek14-Sep-02 21:37 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Philip Patrick14-Sep-02 23:12
professionalPhilip Patrick14-Sep-02 23:12 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Pavel Klocek15-Sep-02 0:22
Pavel Klocek15-Sep-02 0:22 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Ancient Dragon15-Sep-02 17:09
Ancient Dragon15-Sep-02 17:09 
GeneralRe: VS.NET: Compartible with MFC6? Pin
Pavel Klocek15-Sep-02 19:22
Pavel Klocek15-Sep-02 19:22 

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.