Information générale
Catégorie:
Codage, syntaxe et commandes
>Thanks to you, Evan and James for the help. But I'm still pretty new to all this stuff, so maybe a little more direction would help.
Basically what the code does is to set a windows MUTEX (an object that can be owned by a single thread at any one time) and then adds a property to the window object of the application (so that we would be able to identify it later)
if the mutex creation failed - it means another thread (i.e. another instance of the application) had already created one so the application searches for the window that has the property (the one we defined earlier) and switches to it
The advantage of adding a poperty to the window is that you don't depend on the title of the application which can change esp. in document oriented applicatins
Arnon
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement