I need help, I write two programs in C++ prg1.exe and prg2.exe and now:
1. how can prg1 starts automatically prg2
2. how can prg2 send a signal or message to prg1 if i click on the button or the mouse is over the button
3. in prg2 i want show random numbers, how can prg2 send this numbers live to prg1
I don't really know how to make programs communicate, but to start a process you should see http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx (though you can do that with system("prg2.exe") )
However, if the two programs are connected, then why do you need two programs? Wouldn't two threads be enough?
Sure, but some could replace notepad.exe with malicious program and double-clicking an a txt file would run it. If some one has access to your computer and wants to harm you, they'll find a way somehow.