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

C / C++ / MFC

 
GeneralRe: edit ctrl Pin
David Crow29-Dec-04 9:49
David Crow29-Dec-04 9:49 
GeneralRe: edit ctrl Pin
act_x29-Dec-04 10:12
act_x29-Dec-04 10:12 
QuestionTooltip Flickers Continously ? Pin
Azghar Hussain29-Dec-04 7:39
professionalAzghar Hussain29-Dec-04 7:39 
AnswerRe: Tooltip Flickers Continously ? Pin
PJ Arends29-Dec-04 8:11
professionalPJ Arends29-Dec-04 8:11 
GeneralZ-ordering, wndTopMost and modal dialogs Pin
moredip29-Dec-04 7:33
moredip29-Dec-04 7:33 
GeneralRe: Z-ordering, wndTopMost and modal dialogs Pin
Michael Dunn29-Dec-04 14:12
sitebuilderMichael Dunn29-Dec-04 14:12 
GeneralImage processing with visual studio Pin
monageasmear29-Dec-04 6:02
monageasmear29-Dec-04 6:02 
GeneralSome input please Pin
Tom Wright29-Dec-04 4:53
Tom Wright29-Dec-04 4:53 
I'm wanting some input from some of the seasoned programmers out there on a project that I am currently working on.

I am writing an app that from the main app creates a certain number of client socket connections. I'm getting the ip address, a connection id (char[4]), the index from the list control on the main app inwhich they reside (int), and port number passing these to the threads as each thread is created but stopped then resuming that thread.

I want each thread to communicate back to the main app when they have connected to each of their socket server. Currently i'm doing that by passing the index number and connection id and the status back to the main app thru the WM_COPYDATA message.

I just read that it's important not to write over the memory block by another thread because you can loose the information that was there before you wrote it out. I'm afraid that the thread will connect so fast that this may happen and i'll loose out on the status of each thread as it connects.

So what is the best and easiest way to communicate between threads?

I want to be able to tell my thread to shut down if the users presses the disconnect all button....I figure I send a message to all to do that. But what if my end user wants to shut down a specific thread?

And how do my threads tell my main app to update the status of that thread?


ARGGGGG!! I'm learning but at the same time, my brain is either getting bigger and it hurts or I'm getting a tumor.

Thanks for the input.

Tom Wright
tawright915@yahoo.com
GeneralRe: Some input please Pin
Ravi Bhavnani29-Dec-04 5:20
professionalRavi Bhavnani29-Dec-04 5:20 
GeneralRe: Some input please Pin
David Crow29-Dec-04 9:52
David Crow29-Dec-04 9:52 
GeneralWindows crash time Pin
Yaakov Davis29-Dec-04 4:00
Yaakov Davis29-Dec-04 4:00 
GeneralRe: Windows crash time Pin
Michael Dunn29-Dec-04 6:19
sitebuilderMichael Dunn29-Dec-04 6:19 
GeneralRe: Windows crash time Pin
Yaakov Davis29-Dec-04 6:31
Yaakov Davis29-Dec-04 6:31 
GeneralRe: Windows crash time Pin
WoutL29-Dec-04 10:34
WoutL29-Dec-04 10:34 
GeneralVS 2003 hangs when adding class Pin
greekgoddj29-Dec-04 2:01
greekgoddj29-Dec-04 2:01 
GeneralRe: VS 2003 hangs when adding class Pin
Gary R. Wheeler29-Dec-04 2:15
Gary R. Wheeler29-Dec-04 2:15 
GeneralRe: VS 2003 hangs when adding class Pin
greekgoddj29-Dec-04 2:31
greekgoddj29-Dec-04 2:31 
GeneralRe: VS 2003 hangs when adding class Pin
greekgoddj10-Jan-05 21:21
greekgoddj10-Jan-05 21:21 
GeneralN-Ary Tree (almost) Pin
DiamondGeezer29-Dec-04 1:47
DiamondGeezer29-Dec-04 1:47 
GeneralProblem when retrieving Clipboard data in the Enhanced Metadata format. Pin
SivaramanDhamodharan28-Dec-04 23:31
SivaramanDhamodharan28-Dec-04 23:31 
GeneralAlignment problem in ListBox Pin
Rajesh_K_Sharma28-Dec-04 23:27
Rajesh_K_Sharma28-Dec-04 23:27 
GeneralRe: Alignment problem in ListBox Pin
Gary R. Wheeler29-Dec-04 0:37
Gary R. Wheeler29-Dec-04 0:37 
GeneralRe: Alignment problem in ListBox Pin
David Crow29-Dec-04 2:27
David Crow29-Dec-04 2:27 
GeneralRe: Alignment problem in ListBox Pin
David Crow29-Dec-04 2:29
David Crow29-Dec-04 2:29 
Questionhow can i send midi data to the usb??? Pin
namaskaaram28-Dec-04 23:25
namaskaaram28-Dec-04 23:25 

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.