Page 1 of 1

BR 4.2 window size query

Posted: Fri Sep 17, 2010 8:29 pm
by Susan Smith
Hi all,

I'm trying to poll Window #0 to see it's dimensions so that I can center a child window on it. There are new parameters in the FILE command which I thought I could use to get this information, but I can't seem to get it to work or figure out how to utilize the information it produces (which is pixels and seems relative to font sizes).

Can someone who understands this please tell me if it's possible to find out the # rows and columns that a given window # is open to? Or is the only way to do it to use STATUS FILES and parse it to look for "OPEN FILE # 0", etc?

Thanks!

-- Susan

Posted: Sun Sep 19, 2010 11:10 am
by gtisdale
In FNSNAP.dll there is a function (surprised huh?) that will do this for you

FNWINROWCOL(window#,rows,cols)


Will return the rows and columns for the designated window number. This works for "0", the main window, or any other open child window, parent or noparent.

FNGeorge

Posted: Sun Sep 19, 2010 3:25 pm
by Susan Smith
Thank you George!

-- Susan