Get Event when window is front

Hi,

In the other window, I use this function to pop up my window(Pid)

Event.event_f = Ph_WM_TOFRONT;
PtForwardWindowTaskEvent( (PhConnectId_t)Pid, &Event );

It’s OK. But I want to know how I can attach this event in my
window(Pid)

That means in my process Pid, can I get this event ?

Thanks,

Trong Truong Nguyen

Trong Truong Nguyen <tnguyen@aquilamsl.com> wrote:

Hi,

In the other window, I use this function to pop up my window(Pid)

Event.event_f = Ph_WM_TOFRONT;
PtForwardWindowTaskEvent( (PhConnectId_t)Pid, &Event );

It’s OK. But I want to know how I can attach this event in my
window(Pid)

That means in my process Pid, can I get this event ?

Do you mean that you want to know, in the Photon process
identified by Pid, when this event arrives? You can do this.

Add a Pt_CB_WINDOW callback to the base window of your
process. Make sure the Ph_WM_TOFRONT bit of the
Pt_ARG_WINDOW_NOTIFY resource of that window is set. Your
Pt_CB_WINDOW callback should get called when the Ph_WM_TOFRONT
event arrives. There should be some reasonable detail on this in
the window management section of the Photon Programmer’s Guide
in the “Window Management” chapter.

Another approach would be to add a filter callback (Pt_CB_FILTER)
to the window, and watch for a Ph_EV_WM event with Ph_WM_TOFRONT
in the event_f member of the associated PhWindowEvent_t structure.

I hope this helps.


Norbert Black
QSSL Training Services