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

C / C++ / MFC

 
GeneralRe: How to join two programes? Pin
LunaticFringe8-Nov-09 8:05
LunaticFringe8-Nov-09 8:05 
GeneralRe: How to join two programes? Pin
Waldemar Ork8-Nov-09 9:49
Waldemar Ork8-Nov-09 9:49 
QuestionRe: How to join two programes? Pin
David Crow7-Nov-09 10:06
David Crow7-Nov-09 10:06 
Questionneed information about online courses in vc++ Pin
l_d7-Nov-09 3:01
l_d7-Nov-09 3:01 
AnswerRe: need information about online courses in vc++ Pin
Richard MacCutchan7-Nov-09 4:23
mveRichard MacCutchan7-Nov-09 4:23 
Questiondraw buterfly grahics using c,c++ Pin
aviparida7-Nov-09 1:03
aviparida7-Nov-09 1:03 
AnswerRe: draw buterfly grahics using c,c++ Pin
Richard MacCutchan7-Nov-09 4:32
mveRichard MacCutchan7-Nov-09 4:32 
AnswerRe: draw buterfly grahics using c,c++ Pin
CPallini7-Nov-09 8:20
mveCPallini7-Nov-09 8:20 
QuestionHow to get Windows Handler from process id of excel instance. Pin
NarVish7-Nov-09 0:03
NarVish7-Nov-09 0:03 
AnswerRe: How to get Windows Handler from process id of excel instance. Pin
includeh107-Nov-09 1:01
includeh107-Nov-09 1:01 
GeneralRe: How to get Windows Handler from process id of excel instance. Pin
NarVish7-Nov-09 1:40
NarVish7-Nov-09 1:40 
GeneralRe: How to get Windows Handler from process id of excel instance. Pin
includeh107-Nov-09 2:06
includeh107-Nov-09 2:06 
GeneralRe: How to get Windows Handler from process id of excel instance. Pin
NarVish7-Nov-09 2:21
NarVish7-Nov-09 2:21 
QuestionRe: How to get Windows Handler from process id of excel instance. Pin
David Crow7-Nov-09 10:09
David Crow7-Nov-09 10:09 
AnswerRe: How to get Windows Handler from process id of excel instance. Pin
includeh107-Nov-09 10:29
includeh107-Nov-09 10:29 
Questionthread to process call Pin
includeh106-Nov-09 23:27
includeh106-Nov-09 23:27 
AnswerRe: thread to process call Pin
«_Superman_»7-Nov-09 10:50
professional«_Superman_»7-Nov-09 10:50 
When you say a process, there is a main thread in the process.
The main thread creates thread-a.

The thread-a needs to communicate to the main thread to create the other thread.

You can do this using events.
Create an event in the main thread using CreateEvent.
The main thread can then wait for the event to be signaled using WaitForSingleObject.
The other threads can then use SetEvent to signal this event.

If your main thread is a UI thread, you will need another dedicated thread to wait for the event to become signaled so that the UI thread is not blocked.

But I believe PostThreadMessage is a better way to do this.
If your process has a window, you can also use PostMessage to the main window to achieve this.

«_Superman
I love work. It gives me something to do between weekends.

Microsoft MVP (Visual C++)

Questionfunctions of raw socket Pin
includeh106-Nov-09 22:57
includeh106-Nov-09 22:57 
AnswerRe: functions of raw socket Pin
Richard MacCutchan7-Nov-09 4:30
mveRichard MacCutchan7-Nov-09 4:30 
Questionnamed IP to digital IP Pin
includeh106-Nov-09 22:38
includeh106-Nov-09 22:38 
AnswerRe: named IP to digital IP Pin
Tony Richards6-Nov-09 23:34
Tony Richards6-Nov-09 23:34 
GeneralRe: named IP to digital IP Pin
includeh107-Nov-09 2:10
includeh107-Nov-09 2:10 
AnswerRe: named IP to digital IP Pin
David Crow7-Nov-09 10:14
David Crow7-Nov-09 10:14 
AnswerRe: named IP to digital IP Pin
Moak7-Nov-09 15:46
Moak7-Nov-09 15:46 
Question"PostMessage" without window Pin
includeh106-Nov-09 22:26
includeh106-Nov-09 22:26 

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.