Hello,
I would like to center a PtAlert on the main Window of my
application, so from the documentation, I understand that
the first argument of PtAlert is the parent widget (the
main window) and that if the second input (the position) is
NULL then, the PtAlert should be centered.
The problem is that the PtAlert is always getting centered
on the screen on not on the window parent 
Thanks for any help/tips.
Regards.
jean-louis
I believe itās a bug in Photon. I use the following code - it does not
center the dialog in the parent window (canāt do this because donāt know the
size of the alert dialog), but at least it centers the upper left corner in
the parent window.
Youāll need to replace the getXPos() etc with the appropriate calls to
PtGetResource
Markus
PhRect_t currentConsoleExtent;
PhPoint_t center;
PhWindowQueryVisible(0, 0, 1, ¤tConsoleExtent);
center.x = getXPos() - currentConsoleExtent.ul.x + getWidth() / 2;
center.y = getYPos() - currentConsoleExtent.ul.y + getHeight() / 2;
PtAlert(parentWidget, ¢er, ā¦);
āJean-Louis Villecrozeā <jlv@kirilla.com> wrote in message
news:9ggl0o$k4u$1@inn.qnx.comā¦
Hello,
I would like to center a PtAlert on the main Window of my
application, so from the documentation, I understand that
the first argument of PtAlert is the parent widget (the
main window) and that if the second input (the position) is
NULL then, the PtAlert should be centered.
The problem is that the PtAlert is always getting centered
on the screen on not on the window parent > 
Thanks for any help/tips.
Regards.
jean-louis