Handling(show/hide) several families of windows


Our team now writing a qnx application on an embeded system.
From the beginning of this work, the system had equipped PWM. But now suddenly the system doesn’t equip the PWM any more. System engineer doesn’t assure us for using it in any future.

With the PWM, showing and hiding several families of windows were easy. ( Handling of show/hide event was it. ) But without it, without the PWM, how can I do it? With so many windows in several window families…

I tried using PtRealizeWidget and PtUnrealizeWidget. It worked but has one problem - After every realization the windows appear in the order of the siblings.
What is needed is that the previously focused(by the user or sw event) window appears in the frontmost position among it’s siblings when it’s parent window gets re-realized. (I only tried realizing/unrealizing the parent windows not the exact child window.)

Also I tried setting the positions of the windows locating windows to show at (0,0) and locating windows to hide at (-500,-500).
This works well, but I have to make much modification on my already finished source code in many places.

Is there any other better idea for me to try to?
Isn’t it possible that many children windows have locations relative to thier parent’s location? ( I think this could help me. )