Click here to Skip to main content
15,905,781 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DirectShow Pin
Chandrasekharan P19-Feb-08 18:27
Chandrasekharan P19-Feb-08 18:27 
AnswerRe: DirectShow Pin
Rajkumar R19-Feb-08 18:38
Rajkumar R19-Feb-08 18:38 
Generalgaussion function in c++ [modified] Pin
gentleguy19-Feb-08 16:15
gentleguy19-Feb-08 16:15 
GeneralRe: gaussion function in c++ Pin
CPallini19-Feb-08 22:54
mveCPallini19-Feb-08 22:54 
GeneralRe: gaussion function in c++ [modified] Pin
gentleguy20-Feb-08 0:31
gentleguy20-Feb-08 0:31 
QuestionRe: gaussion function in c++ Pin
CPallini20-Feb-08 4:26
mveCPallini20-Feb-08 4:26 
GeneralUI Thread question (noob) Pin
Maximilien19-Feb-08 13:47
Maximilien19-Feb-08 13:47 
GeneralRe: UI Thread question (noob) Pin
Mark Salsbery19-Feb-08 14:45
Mark Salsbery19-Feb-08 14:45 
Maximilien wrote:
Is modifying the m_bRunning with a direct call the preferred way ?


In this case, yes.  To make the interface cleaner (instead of the inconsistent
post a message to start, set a variable to stop) you could add two public methods
to your thread class - Play() and Stop().  In Play(), post your WM_PLAY_THREAD_MESSAGE,
and in Stop(), you can set your running flag.  That makes the thread control interface nice
and clean to the outside world.

Just my 2 cents - IMO, beyond the learning experience, the implementation is overkill...
a simple timer at 500ms intervals would make a much cleaner solution, without the need
for the secondary thread.  Periodic timers are made for what you're doing there Smile | :)

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: UI Thread question (noob) Pin
Maximilien19-Feb-08 15:11
Maximilien19-Feb-08 15:11 
QuestionHow to start ? built app to communication through USB port Pin
quangpk19-Feb-08 13:12
quangpk19-Feb-08 13:12 
AnswerRe: How to start ? built app to communication through USB port Pin
Maxwell Chen19-Feb-08 15:57
Maxwell Chen19-Feb-08 15:57 
QuestionAny buttons styles to get a CButton to look like a toolbar button? Pin
jeffb4219-Feb-08 11:19
jeffb4219-Feb-08 11:19 
GeneralRe: Any buttons styles to get a CButton to look like a toolbar button? Pin
Maxwell Chen19-Feb-08 16:50
Maxwell Chen19-Feb-08 16:50 
GeneralSingle Processor Multithreaded Application!!!!!!! Does it Help????????????????? [modified] Pin
swarup19-Feb-08 10:05
swarup19-Feb-08 10:05 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
Maximilien19-Feb-08 10:24
Maximilien19-Feb-08 10:24 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
swarup19-Feb-08 10:53
swarup19-Feb-08 10:53 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
Dave Kreskowiak21-Feb-08 9:35
mveDave Kreskowiak21-Feb-08 9:35 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
led mike19-Feb-08 10:54
led mike19-Feb-08 10:54 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
swarup19-Feb-08 11:08
swarup19-Feb-08 11:08 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
led mike19-Feb-08 11:31
led mike19-Feb-08 11:31 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
swarup19-Feb-08 12:20
swarup19-Feb-08 12:20 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
led mike19-Feb-08 12:24
led mike19-Feb-08 12:24 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
David Crow19-Feb-08 17:04
David Crow19-Feb-08 17:04 
GeneralRe: Single Processor Multithreaded Application!!!!!!! Does it Help????????????????? Pin
Waldermort19-Feb-08 20:09
Waldermort19-Feb-08 20:09 
QuestionHow to make a line of bank customers with Queue Pin
apejman19-Feb-08 7:11
apejman19-Feb-08 7:11 

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.