Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem about Socket Pin
Mark Salsbery10-Aug-07 14:45
Mark Salsbery10-Aug-07 14:45 
GeneralRe: Problem about Socket Pin
kcynic10-Aug-07 16:42
kcynic10-Aug-07 16:42 
AnswerRe: Problem about Socket Pin
Snnu10-Aug-07 15:53
Snnu10-Aug-07 15:53 
GeneralRe: Problem about Socket Pin
kcynic10-Aug-07 21:26
kcynic10-Aug-07 21:26 
GeneralRe: Problem about Socket Pin
Mark Salsbery11-Aug-07 6:22
Mark Salsbery11-Aug-07 6:22 
GeneralRe: Problem about Socket Pin
kcynic11-Aug-07 18:00
kcynic11-Aug-07 18:00 
QuestionSending data between threads Pin
Greg Vandenberg AFB10-Aug-07 14:00
Greg Vandenberg AFB10-Aug-07 14:00 
AnswerRe: Sending data between threads Pin
T-Mac-Oz10-Aug-07 16:04
T-Mac-Oz10-Aug-07 16:04 
Your linker problem is caused by the fact that the global variable "icount" is instantiated in every source file that includes the .h that declares it.
Try:

(In .h file)
<ref>
...
extern volatile long icount;
..


and in either of TimeThread.cpp or clockDlg.cpp (but not both)

<ref>
...
volatile long icount;
...


Without the "volatile" keyword, it doesn't matter how many mutexes you use, different threads may see different values depending on compiler optimisations.

It doesn't look to me as though you really need synchronisation with what you're doing here though, so why not just use RegisterWindowMessage(...) at startup to get a unique message ID & use PostMessage(...) from your worker thread to send the value to your dialog?

Regards,

T-Mac-Oz

QuestionNavigation in MFC source code Pin
sawerr10-Aug-07 13:52
sawerr10-Aug-07 13:52 
AnswerRe: Navigation in MFC source code Pin
Mark Salsbery10-Aug-07 14:53
Mark Salsbery10-Aug-07 14:53 
AnswerRe: Navigation in MFC source code Pin
T-Mac-Oz10-Aug-07 16:53
T-Mac-Oz10-Aug-07 16:53 
GeneralRe: Navigation in MFC source code Pin
sawerr10-Aug-07 17:41
sawerr10-Aug-07 17:41 
QuestionRe: Navigation in MFC source code Pin
David Crow11-Aug-07 6:41
David Crow11-Aug-07 6:41 
AnswerRe: Navigation in MFC source code Pin
Mark Salsbery11-Aug-07 6:50
Mark Salsbery11-Aug-07 6:50 
QuestionMSDIA80.dll cannot be loaded Pin
Tom Thorp10-Aug-07 11:34
Tom Thorp10-Aug-07 11:34 
AnswerRe: MSDIA80.dll cannot be loaded Pin
Mark Salsbery10-Aug-07 12:03
Mark Salsbery10-Aug-07 12:03 
GeneralRe: MSDIA80.dll cannot be loaded Pin
Tom Thorp10-Aug-07 13:45
Tom Thorp10-Aug-07 13:45 
GeneralRe: MSDIA80.dll cannot be loaded Pin
Tom Thorp13-Aug-07 5:13
Tom Thorp13-Aug-07 5:13 
GeneralRe: MSDIA80.dll cannot be loaded Pin
Mark Salsbery13-Aug-07 5:35
Mark Salsbery13-Aug-07 5:35 
Questionthread communications [modified] Pin
alberthyc10-Aug-07 10:10
alberthyc10-Aug-07 10:10 
AnswerRe: thread communications Pin
Mark Salsbery10-Aug-07 10:26
Mark Salsbery10-Aug-07 10:26 
GeneralRe: thread communications Pin
alberthyc10-Aug-07 10:32
alberthyc10-Aug-07 10:32 
GeneralRe: thread communications Pin
Mark Salsbery10-Aug-07 10:42
Mark Salsbery10-Aug-07 10:42 
GeneralRe: thread communications [modified] Pin
alberthyc10-Aug-07 10:55
alberthyc10-Aug-07 10:55 
GeneralRe: thread communications Pin
Mark Salsbery10-Aug-07 11:06
Mark Salsbery10-Aug-07 11:06 

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.