Photon app not centered on screen

My Photon app (created with PhAB) looks ok when I run it on my
development machine, where it is a 640x480 window on a 1024x768 screen.
But when I run it on the target, which is a 640x480 flat panel, it is
slightly off center (a little high and a little to the left). Since the
windows/dialogs are 640x480, this causes some clipping. At first I
thought the shelves were pushing it over but it still does it even after
I slay the shelf. Anybody know why?

I don’t think this is related, but I have a flat panel that does
auto adjusting of the picture location. It does this when the
video mode changes. So when Photon starts, what comes up. The
login panel surrounded by black. The panel gets confused and offsets
photon. The annoying solution is to turn the monitor off and on.


Previously, Bruce Davis wrote in qdn.public.qnxrtp.photon:

My Photon app (created with PhAB) looks ok when I run it on my
development machine, where it is a 640x480 window on a 1024x768 screen.
But when I run it on the target, which is a 640x480 flat panel, it is
slightly off center (a little high and a little to the left). Since the
windows/dialogs are 640x480, this causes some clipping. At first I
thought the shelves were pushing it over but it still does it even after
I slay the shelf. Anybody know why?


Mitchell Schoenbrun --------- maschoen@pobox.com

Bruce Davis <bruce.r.davis@boeing.com> wrote:

My Photon app (created with PhAB) looks ok when I run it on my
development machine, where it is a 640x480 window on a 1024x768 screen.
But when I run it on the target, which is a 640x480 flat panel, it is
slightly off center (a little high and a little to the left). Since the
windows/dialogs are 640x480, this causes some clipping. At first I
thought the shelves were pushing it over but it still does it even after
I slay the shelf. Anybody know why?

Is it possible that the window itself is a bit big? Try using
PtGetResources to grab and dump to console or file what the
reported dimensions at runtime are. I’ve know people to wind up
with different sizes than they thought they were getting…

Also, try the same with the position. Is it (0,0) (assuming
console 1)?

Another thing to try is what happens if you set (from code, if
you don’t run using a window frame) the window state to
maximized? If the window’s still riding high and to the left,
I’d start wondering if there’s something odd about the display
hardware that’s clipping a few pixels on the top and left edges.
I know I can set the monitor I’m using to tweak the CRT guns to
display things out of the box that’s visible. Different
technology for a flat panel, but maybe something similar?

The HW guys might get benefit from seeing your trap file if the
maximizing/position/size stuff all gives expected and consistent
data.

Hope that suggests something useful.


Norbert Black
QSSL Training Services

Bruce Davis wrote:

My Photon app (created with PhAB) looks ok when I run it on my
development machine, where it is a 640x480 window on a 1024x768 screen.
But when I run it on the target, which is a 640x480 flat panel, it is
slightly off center (a little high and a little to the left). Since the
windows/dialogs are 640x480, this causes some clipping. At first I
thought the shelves were pushing it over but it still does it even after
I slay the shelf. Anybody know why?

do you ‘slay’ the shelf or exit it? Since the shelf is somewhat weird
it never reset the area it has ‘reserved’ unless you exit it the correct
way (right click and choose ‘exit’ ) Since you slayed it, the
screenreserve is still there.
Hope this helps

/Johan