getting to the wxapp via window handle...

Be very careful with that as it (in the example) only allows one
instance per user.

One of my pet peeves is programs that don't recognize that a
user can be logged in from multiple locations. For example
on Linux I am often running a gui session on the console
as well as via a VNC session. They have nothing to do
with each other. Similarly you can be logged into a Windows box multiple times over RDP.

Nothing gets more annoying than being told in a session
than app is already running and you must bring it up
when it is displayed in another session. (Or the
web browsers that display links in an existing instance
of the browser displaying somewhere else).

In wx 2.5, you can also include wx.Display(0).GetName()
as part of the mutex name, thereby ensuring that people
like me don't have their peeves tickled

Roger

Thanks!

The following link also provided some useful info on "uniqueness" (on win32):

http://www.codeproject.com/cpp/avoidmultinstance.asp?df=100&forumid=695&exp=0&select=751409

ยทยทยท

--
Vincent Wehren <vincent@visualtrans.de>
http://www.visualtrans.de

Vincent Wehren wrote:

The following link also provided some useful info on "uniqueness" (on
win32):

http://www.codeproject.com/cpp/avoidmultinstance.asp?df=100&forumid=695&exp=0&select=751409

It basically boils down to use a mutex which is what I believe the
win32 code in wxWidgets does.

You can also verify your code is working correctly by using
Process Explorer from www.sysinternals.com. It shows the
mutexes help by each process (but calls them mutants :-).
It also shows threads, registry keys, files, semaphores etc.

Roger