Changing focus between applications

I am running QNX 4.25 with Photon 1.14, on an industrial PC with a touch
screen.

I have two applications running, call them A and B.

At certain times, A’s windows are unrealized and B’s are realized, ie we can
see application B. I have an external switch which, when activated, causes
a window from application A to be display for user input. However, it is
drawn and then instantly B is drawn in front of it. Application A’s window
is smaller than B’s, and we wish to keep B’s screen visible behind A’s.

Is there any way to switch focus from one appliation to another
automatically, without the use of a keyboard or mouse (these aren’t
connected in normal use anyway)?

I have tried PtWindowToFront(), PtContainerGiveFocus() and PtWindowFocus but
they only seem to work within the application you call it from.

Any suggestions?

Rodney Gullickson
Project Engineer
Tritronics Australia

What is with have two console and using PtConsoleSwitch()?
The function PtForwardWindowEvent()
(http://qdn.qnx.com/support/docs/photon114/lib_ref/pt/ptforwardwindowevent.h
tml)
can send events to a window. I think you could say window to front or window
get focus. The problem is only that you
need to find out his region.

Bye Sascha( sascha@bitctrl.de )

Sascha Morgenstern
BitCtrl Systems GmbH
Weißenfelser Straße 67
Germany - 04229 Leipzig
Phon. +49 341 490 670
FAX. +49 341 490 67 15
eMail: sascha@bitctrl.de
WWW: http://www.bitctrl.de


“Browski” <bstar81@hotmail.com> schrieb im Newsbeitrag
news:9dfi1f$c5g$1@inn.qnx.com

I am running QNX 4.25 with Photon 1.14, on an industrial PC with a touch
screen.

I have two applications running, call them A and B.

At certain times, A’s windows are unrealized and B’s are realized, ie we
can
see application B. I have an external switch which, when activated,
causes
a window from application A to be display for user input. However, it is
drawn and then instantly B is drawn in front of it. Application A’s
window
is smaller than B’s, and we wish to keep B’s screen visible behind A’s.

Is there any way to switch focus from one appliation to another
automatically, without the use of a keyboard or mouse (these aren’t
connected in normal use anyway)?

I have tried PtWindowToFront(), PtContainerGiveFocus() and PtWindowFocus
but
they only seem to work within the application you call it from.

Any suggestions?

Rodney Gullickson
Project Engineer
Tritronics Australia

\