I am trying to add support for “Send to” from window explorer right click context menu feature into my MFC application. For this I’ve parsed command line argument m_lpCmdLine in InitInstance() to get the file path and opened it. This is the case when application is not running.
But in case when application is already running. Then in this case I don’t want to create a new instance.
What will be needed for passing these command line options, to already existing instance.
Any suggestions will be very helpful.
Thanks!
Thanks I got the solution!
I need to find the handle of the open instance and the send message along with data which will be handle in CMainFrame class.
Now in,
we can get this value.
For more detail description, read inter-process communication chapter of “Multithreading Application in Win32”.