Click here to Skip to main content
15,912,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: About DirectX Video Capture Pin
Justin Tay27-Mar-06 1:58
Justin Tay27-Mar-06 1:58 
QuestionRe: About DirectX Video Capture Pin
crazymubashir27-Mar-06 2:46
crazymubashir27-Mar-06 2:46 
AnswerRe: About DirectX Video Capture Pin
Justin Tay27-Mar-06 3:04
Justin Tay27-Mar-06 3:04 
GeneralRe: About DirectX Video Capture Pin
crazymubashir28-Mar-06 1:01
crazymubashir28-Mar-06 1:01 
GeneralRe: About DirectX Video Capture Pin
Justin Tay28-Mar-06 23:49
Justin Tay28-Mar-06 23:49 
GeneralRe: About DirectX Video Capture Pin
crazymubashir4-Apr-06 21:27
crazymubashir4-Apr-06 21:27 
AnswerRe: About DirectX Video Capture Pin
aloha181226-Apr-06 0:39
aloha181226-Apr-06 0:39 
QuestionMultithreading Pin
Waldermort27-Mar-06 1:36
Waldermort27-Mar-06 1:36 
Well, after a long time, way too long, I have managed to implement multi threading into my project. Whoever said Multithreading was easy to learn should be taken out and have TCP poured into his eyes.

Anyway, I have got to a part where I need to communicate with the main thread. I am using PostMessage to indicate when the thread has finished which is working no problem. But on each iteration of the thread I want to display some text and increase a progress bar on the main dialog. I am again using PostMessage to do this but the results are not very good.

The problem is because PostMessage returns before the command has executed, text is often missed and the progress bar falls short. Now I am writing the text into global scope, so I somehow need to force the thread to wait until the main thread has done what it should.

After reading through the projects on CP I am left even more confused, there is so much talk of Mutex, Critical sections, Syncronisation... And to make things even more difficult most of them are for MFC which I just can't understand.

Somebody please, in simple terms, what should I do here? And if possible a simple non-MFC example.

Thankyou.
AnswerRe: Multithreading Pin
sunit527-Mar-06 1:48
sunit527-Mar-06 1:48 
AnswerRe: Multithreading Pin
Justin Tay27-Mar-06 1:51
Justin Tay27-Mar-06 1:51 
GeneralRe: Multithreading Pin
Waldermort27-Mar-06 2:10
Waldermort27-Mar-06 2:10 
GeneralRe: Multithreading Pin
Waldermort27-Mar-06 2:17
Waldermort27-Mar-06 2:17 
GeneralRe: Multithreading Pin
Justin Tay27-Mar-06 2:33
Justin Tay27-Mar-06 2:33 
GeneralRe: Multithreading Pin
David Crow27-Mar-06 4:53
David Crow27-Mar-06 4:53 
GeneralRe: Multithreading Pin
Waldermort27-Mar-06 18:04
Waldermort27-Mar-06 18:04 
QuestionRe: Multithreading Pin
David Crow28-Mar-06 2:29
David Crow28-Mar-06 2:29 
AnswerRe: Multithreading Pin
El Corazon27-Mar-06 2:14
El Corazon27-Mar-06 2:14 
AnswerRe: Multithreading Pin
Michael Dunn27-Mar-06 9:00
sitebuilderMichael Dunn27-Mar-06 9:00 
QuestionHow to implement crop feature in VC++ Pin
snprani@yahoo.com27-Mar-06 1:29
snprani@yahoo.com27-Mar-06 1:29 
AnswerRe: How to implement crop feature in VC++ Pin
_AnsHUMAN_ 27-Mar-06 3:31
_AnsHUMAN_ 27-Mar-06 3:31 
QuestionAny reson why SelectObject would not work for new bitmap? Pin
Laughing Buddha27-Mar-06 0:15
Laughing Buddha27-Mar-06 0:15 
AnswerRe: How do I select a CBitmap into a dc? Pin
Hamid_RT27-Mar-06 0:26
Hamid_RT27-Mar-06 0:26 
AnswerRe: How do I select a CBitmap into a dc? Pin
Hamid_RT27-Mar-06 0:35
Hamid_RT27-Mar-06 0:35 
GeneralRe: How do I select a CBitmap into a dc? Pin
Laughing Buddha27-Mar-06 3:03
Laughing Buddha27-Mar-06 3:03 
QuestionA problem when port win32console C++ from vs2003 to 2005 Pin
tiancaidao26-Mar-06 23:03
tiancaidao26-Mar-06 23:03 

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.