Click here to Skip to main content
16,005,339 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: while loop in threads Pin
ledallam28-Sep-04 19:48
ledallam28-Sep-04 19:48 
GeneralRe: while loop in threads Pin
Andrzej Markowski28-Sep-04 20:09
Andrzej Markowski28-Sep-04 20:09 
GeneralRe: while loop in threads Pin
ledallam28-Sep-04 20:30
ledallam28-Sep-04 20:30 
GeneralRe: while loop in threads Pin
Andrzej Markowski28-Sep-04 20:50
Andrzej Markowski28-Sep-04 20:50 
GeneralRe: while loop in threads Pin
ledallam28-Sep-04 21:17
ledallam28-Sep-04 21:17 
GeneralRe: while loop in threads Pin
Andrzej Markowski28-Sep-04 21:32
Andrzej Markowski28-Sep-04 21:32 
GeneralRe: while loop in threads Pin
ledallam28-Sep-04 21:39
ledallam28-Sep-04 21:39 
GeneralRe: while loop in threads Pin
Blake Miller29-Sep-04 4:22
Blake Miller29-Sep-04 4:22 
It's not unusual for the CPU to go to 100% for an intensive operation like reading every line from a file and updating the UI for every line of text. If the CPU usage drops back to normal levels after the file is processed, I would think your code is fine.
The only change I would make is to perhaps consider resetting the event REGARDLESS of the result of the wait operation. As long as it is not critical that EVERY line get updated to the display, because under normal circumstanes, you are not going to get WAIT_FAILED. You will probably never see WAIT_TIMEOUT since you specified INFINITE.

GeneralCalling vb .net dll in a C++ console app Pin
Tumisang28-Sep-04 0:26
Tumisang28-Sep-04 0:26 
GeneralRe: Calling vb .net dll in a C++ console app Pin
BAIJUMAX28-Sep-04 1:45
professionalBAIJUMAX28-Sep-04 1:45 
GeneralCFile::Read() : Giving zero bytes read Pin
Ardhendu_diva28-Sep-04 0:09
Ardhendu_diva28-Sep-04 0:09 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
22491728-Sep-04 1:03
22491728-Sep-04 1:03 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
ardhendu12328-Sep-04 1:46
ardhendu12328-Sep-04 1:46 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
22491728-Sep-04 17:23
22491728-Sep-04 17:23 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
Antony M Kancidrowski28-Sep-04 1:50
Antony M Kancidrowski28-Sep-04 1:50 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
ardhendu12328-Sep-04 1:57
ardhendu12328-Sep-04 1:57 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
Antony M Kancidrowski28-Sep-04 2:22
Antony M Kancidrowski28-Sep-04 2:22 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
vcplusplus28-Sep-04 4:07
vcplusplus28-Sep-04 4:07 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
David Crow28-Sep-04 4:11
David Crow28-Sep-04 4:11 
GeneralCan't prevent new window opening! Pin
henryfonda27-Sep-04 23:26
henryfonda27-Sep-04 23:26 
GeneralRe: Can't prevent new window opening! Pin
agentnem28-Sep-04 10:00
agentnem28-Sep-04 10:00 
GeneralRe: Can't prevent new window opening! Pin
henryfonda28-Sep-04 14:25
henryfonda28-Sep-04 14:25 
GeneralRe: Can't prevent new window opening! Pin
Scott H. Settlemier28-Sep-04 14:55
Scott H. Settlemier28-Sep-04 14:55 
GeneralRe: Can't prevent new window opening! Pin
henryfonda28-Sep-04 21:04
henryfonda28-Sep-04 21:04 
GeneralHowto change the font of a CStatic text Pin
anderslundsgard27-Sep-04 22:26
anderslundsgard27-Sep-04 22:26 

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.