There are two applications: one console, the other graphic. The console application on launch from the command line accepts the parameter specified in the command line and transfers this parameter to the graphical application. The idea is as follows: when launching the console application, find the target window of the graphical application and send it a message with a parameter. Both applications on MFC + WinAPI.
How to find the target window?