[R] Problems in plot

Duncan Murdoch dmurdoch at pair.com
Wed May 5 15:18:11 CEST 2004


On 05 May 2004 09:12:59 +0200, Peter Dalgaard
<p.dalgaard at biostat.ku.dk> wrote :

>Duncan Murdoch <dmurdoch at pair.com> writes:
>
>> I've removed the test for the size of the frame in the case where the
>> frame is minimized.  Now for a minimized R it just uses the physical
>> size of the monitor, as before:  likely giving a window that's too
>> big, but at least not causing errors.
>
>It would be better if you could get a hold of the unminimized size (as
>opposed to the maximized one). Isn't there a way to do that on
>Windows?

I don't know if there is.  I think the GetWindowPlacement function
Brian mentioned returns what GetWindowRect would give if the window
hadn't been minimized, but what we want is GetClientRect. 

GetWindowRect gives the outer dimensions of the window, GetClientRect
gives the "client area", i.e. the area where the MDI child windows are
allowed to show.  GetWindowRect is also too big, just not necessarily
as much too big as what we're currently using (which is what pre-1.9.0
versions were using).

It's possible that we could compute something like GetClientRect, but
it's hard, because I think it depends on all sorts of things like font
settings, etc.  It doesn't really seem worth it to me.  How often do
people create new graphics windows while the MDI frame is minimized,
anyway?

Duncan Murdoch




More information about the R-help mailing list