Avoid multiple instances of my program and send content of Command$ to existing instance ?
Posted on 2001-07-23
How do I avoid mulitple instances of my program ?
I want to have the same functionality as for example GetRight, Visual InterDev and other programs that, when a file associated with it is opened is opened in an existing instance and not in a new one.
I found some code that'll do it, but it doesn't seem to work.
It uses the FindWindow() API call, but as the caption of my program changes all the time I will need to use the class name to find an existing instance, but how do I find out what the class name of my program is !?