Still does not add up :roll: Even though the red Square clearly defines the internal of the window. When I set the XY location of the main window, it draws in the wrong place. :roll:
"menuy" is just a offset from the height of the menu bar, it is about 12px basically ( totally relevant ) but it also has 8px added on. So the Y offset ends up being 20px.. This would be the equivalent of drawing the red box 20px further down from under the title bar... It does not make sense..
Code: Select all
junk=rsrc_gaddr(0,INFO%,tree&) ' get new tree address
w=getob_width(HARD_BOX2%) ' get W
h=getob_height(HARD_BOX2%) ' get H
x= (maxw/2) - (w/2)
y= ((maxh/2) - (h/2))
WINDOW OPEN MAINID,"GEMBENCH 7."+build$+tmp$ ,x,y,w+4,h+menuy+4,&h9
junk=wind_get(our_aeshandle,WF_WORKXYWH,xw,yw,ww,hw) ' get work area of the main window (internal)
setob_y HARD_BOX2%,yw+menuy+8 'set the object location on the screen
setob_x HARD_BOX2%,xw+10
junk=objc_draw(tree&,HARD_BOX2%,7,0,0,0,0) ' draw info box at the internal window dimentions
This is the result of the above code. Granted the X axis is a little out.. but not important right now.
1.PNG
Now what *should* work is using the "red square" dimensions with no offsets at all. But this gives this instead.
2.PNG
The only possible thing is that the function to set the window location does not work correctly for some reason :roll:
:dizzy:
EDIT:
I guess it's possible the window (red block) takes into account the menubar size. But the object positioning is absolute on the screen and does not take into account the menubar.But that would not explain the X-axis being out as well :roll:
EDIT2:
But even with offsets it won't work with higher resolutions :roll:
Capture.PNG
You do not have the required permissions to view the files attached to this post.