“WeiBing Tong” <wbtong@aquilamsl.com> wrote in message
news:3A82A9BB.FF953456@aquilamsl.com…
What controls the the minimizing? Ph_WM_STATE_ISHIDDEN or
Ph_WM_STATE_ISICONIFIED?
The docs say that if you set the Ph_WM_STATE_* before the widget is
realized
that it should come up correctly. Is this wrong?
Which Pt_ARG_WINDOW_MANAGED_FLAGS do I need to set for minimizing?
Thanks for the reply.
(1) I just try it on Photon1.14, you can set Pt_ARG_WINDOW_STATE as
Ph_WM_STATE_ISHIDDEN or Ph_WM_STATE_ISICON.
Yes. I also have tried this and it works.
But this is not exactly what I’m trying to do. I would like to set the
Pt_ARG_WINDOW_STATE flags inside the Window Setup function, before the
window is realized. This is where I have the problem. If a window is
minimized on exit, my App has to have the window minimized when the App is
started again.
It seems something in Photon is changing the Pt_ARG_WINDOW_STATE flag back
to Ph_WM_STATE_ISNORMAL and then my window does not come up minimized as
desired. Why?
When I set the Ph_WM_STATE_ISHIDDEN or Ph_WM_STATE_ISICON in Phab, then the
window is minimized. I want to leave the window as Ph_WM_STATE_ISNORMAL and
then change the Pt_ARG_WINDOW_STATE inside the window setup function if the
window is to be minimized.
Why do we need to flags (Ph_WM_STATE_ISICON and Ph_WM_STATE_ISHIDDEN)?
Augie
(2) You can set Pt_ARG_WINDOW_STATE as Ph_WM_STATE_ISNORMAL
(default), when you lanch your program, add an option like: Test -Si.
(3) When you want to control your window state in your code, use
PtForwardWindowEvent().
(4) When you want to control your window state from other process, use
PtForwardWindowTaskEvent().
(5) When you want to check your window state, do not use PtGetResources()
to get
Pt_ARG_WINDOW_STATE
resources, use PtWindowgetState() instead. This is against those Docs.
Hope this is helpful for you!
Regards
–
WeiBing Tong
Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: > wbtong@aquilamsl.com