bool wb_get_instance (string caption [, bool bringtofront])
Detects a running instance of a WinBinder application.
Each main window of all WinBinder applications stores a 32-bit identifier
that is calculated according to the initial window caption and is unique
to that caption. wb_get_instance() will try to find, among all current
top-level windows, a WinBinder
window that was created with the same caption. The function returns
TRUE
if it finds the existing window or FALSE
if it is does not.
The function is effective even of the caption of the first instance of the application is changed at runtime because the 32-bit identifier does not change throughout the life of the application.
If bringtofront is set to TRUE, the function optionally restores the window (if minimized) and brings the corresponding window to the front of other windows.
|