You can control the way an application is
called with the following Cicode routine:
FUNCTION VIEWCALC()
int calc;
calc=WNDFIND("Calculator");
if calc=0 then
EXEC("C:\windows\calc.exe")
else
WNDSHOW(calc,9)
end
end
The routine uses the WndFind function to search the environment
for a window already running the application. WndFind will search
for the name appearing in the window title bar. If it does not find
an application already running, it will load it afresh. If it found
to be running, it will redisplay it in its previous mode. For
example, if the operator has minimised the window it will redisplay
it full size. Read the help entries for WndFind, WndShow and Exec
to ensure that you understand their functionality.
You will need to provide the operators with a button on the
template or on the mimic to call the external application. The Up
Action of the button calls (in this example) viewcalc(). You can
use the icons.calc symbol from the include project symbol library
to get a windows standard appearance.
|