Basic intuition question about WA_MinWidth/WA_MinHeight with WFLG_GIMMEZEROZERO

Online Status

Hello,
I have a resizable window, and force default size of the inner window without the borders, so I have WFLG_GIMMEZEROZERO.
and I give the the default size with WA_InnerWidth,WA_InnerHeight (instead of WA_Width/Height). It opens with the right size.

But then, I also want the minimum size to be the same as the default size.
It doesnt work because WA_MinWidth/WA_MinHeight doesn't follow the GZZ way, it consider the borders are part of the size..
... so I have:

WA_InnerWidth, _machineWidth,
WA_InnerHeight, _machineHeight,
WA_MaxWidth, _machineWidth*_maxzoomfactor,
WA_MaxHeight, _machineHeight*_maxzoomfactor,
WA_MinWidth, _machineWidth,
WA_MinHeight, _machineHeight,

so I can reduce the window of _machineWidth/Height, minus the border size ... th'at not wahat I want.
It would be fine if I have the actual window border size with this I guess:
WA_MinWidth, _machineWidth+leftborderwidth+rightborderwidth,
WA_MinHeight, _machineHeight+topheight+bottomheight,

But those border siuze values are no-where.
... Or is there a proper way ?

Online Status

You could get the BorderLeft, etc. from the Window structure after opening the window, and then call WindowLimits().

Online Status

oh great thanks

Online Status

You could get the BorderLeft, etc. from the Window structure after opening the window, and then call WindowLimits().

Alternatively you may use Screen structure attributes: WBorLeft, WBorTop, WBorRight and WBorBottom. These are known before opening the Window.

Note, that the top border is extended by Screen->RastPort.Font->tf_YSize + 1. Gadgets added to the Border of a Window can extend the size of these Borders as well.