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

C / C++ / MFC

 
AnswerRe: 3D Software Pin
CPallini15-Jan-10 0:46
mveCPallini15-Jan-10 0:46 
GeneralRe: 3D Software Pin
LunaticFringe15-Jan-10 0:57
LunaticFringe15-Jan-10 0:57 
AnswerRe: 3D Software Pin
Rajesh R Subramanian15-Jan-10 1:14
professionalRajesh R Subramanian15-Jan-10 1:14 
GeneralRe: 3D Software Pin
LunaticFringe15-Jan-10 1:28
LunaticFringe15-Jan-10 1:28 
GeneralRe: 3D Software Pin
glitteringsound17-Jan-10 21:04
glitteringsound17-Jan-10 21:04 
QuestionRe: 3D Software Pin
ashwath197915-Jan-10 1:28
ashwath197915-Jan-10 1:28 
AnswerRe: 3D Software Pin
Rajesh R Subramanian15-Jan-10 5:15
professionalRajesh R Subramanian15-Jan-10 5:15 
QuestionRe: 3D Software Pin
ashwath197915-Jan-10 17:31
ashwath197915-Jan-10 17:31 
AnswerRe: 3D Software Pin
Rajesh R Subramanian15-Jan-10 18:52
professionalRajesh R Subramanian15-Jan-10 18:52 
GeneralRe: 3D Software Pin
ashwath197915-Jan-10 19:15
ashwath197915-Jan-10 19:15 
AnswerRe: 3D Software Pin
Rajesh R Subramanian15-Jan-10 19:24
professionalRajesh R Subramanian15-Jan-10 19:24 
AnswerRe: 3D Software [modified] Pin
Adam Roderick J15-Jan-10 1:16
Adam Roderick J15-Jan-10 1:16 
QuestionExecute two classes Pin
darshic14-Jan-10 23:50
darshic14-Jan-10 23:50 
AnswerRe: Execute two classe Pin
Adam Roderick J15-Jan-10 0:05
Adam Roderick J15-Jan-10 0:05 
GeneralRe: Execute two classe Pin
darshic15-Jan-10 0:15
darshic15-Jan-10 0:15 
GeneralRe: Execute two classe Pin
Adam Roderick J15-Jan-10 0:24
Adam Roderick J15-Jan-10 0:24 
GeneralRe: Execute two classe Pin
Rajesh R Subramanian15-Jan-10 1:09
professionalRajesh R Subramanian15-Jan-10 1:09 
GeneralRe: Execute two classe Pin
Rajesh R Subramanian15-Jan-10 1:08
professionalRajesh R Subramanian15-Jan-10 1:08 
AnswerRe: Execute two classes Pin
CPallini15-Jan-10 0:19
mveCPallini15-Jan-10 0:19 
AnswerRe: Execute two classes Pin
Mattias G15-Jan-10 1:34
Mattias G15-Jan-10 1:34 
GeneralRe: Execute two classes Pin
Cedric Moonen15-Jan-10 2:23
Cedric Moonen15-Jan-10 2:23 
GeneralRe: Execute two classes Pin
Mattias G15-Jan-10 3:44
Mattias G15-Jan-10 3:44 
GeneralRe: Execute two classes Pin
Cedric Moonen15-Jan-10 4:07
Cedric Moonen15-Jan-10 4:07 
GeneralRe: Execute two classes Pin
Rajesh R Subramanian15-Jan-10 5:18
professionalRajesh R Subramanian15-Jan-10 5:18 
GeneralRe: Execute two classes Pin
CPallini15-Jan-10 5:42
mveCPallini15-Jan-10 5:42 
Have a look at Idle Loop Processing, namely:
Many applications perform lengthy processing "in the background." Sometimes performance considerations dictate using multithreading for such work. Threads involve extra development overhead, so they are not recommended for simple tasks like the idle-time work that MFC does in the OnIdle function. This article focuses on idle processing. For more information about multithreading, see Multithreading Topics.

Some kinds of background processing are appropriately done during intervals that the user is not otherwise interacting with the application. In an application developed for the Microsoft Windows operating system, an application can perform idle-time processing by splitting a lengthy process into many small fragments. After processing each fragment, the application yields execution control to Windows using a PeekMessage loop.

Aside of performance considerations, I've underlined the key concept behind idle time processing: you need to fragment a lenghty operation. That means you've to build a state machine. Of course it is a viable approach but using a separate thread means that, conceptually, the execution flow is never broken.
Multithreading requires care, I admit, but you cannot deduce by your bad experience with, that multithreading is bad.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

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.