Page 1 of 1
Setting WA_Zoom
Posted: Tue May 14, 2013 12:10 am
by chris
I notice that it is legal to set WA_Zoom on an open Intuition window, according to the AutoDocs.
However, it is not legal (and doesn't work; I tried it) to set WA_Zoom on an open window created using window.class.
a) Why?
b) Is there a way around this? I'd like to adjust the zoomed setting so it fits the window contents when the maximum size of said contents change.
Re: Setting WA_Zoom
Posted: Tue May 14, 2013 1:14 am
by Rigo
Well, there are no hints in the code why window.class cannot have WA_Zoom set after it is opened, but I did see that WA_WindowBox CAN be set, so that might be a suitable alternative.
Simon
Re: Setting WA_Zoom
Posted: Tue May 14, 2013 10:32 am
by thomasrapp
I'd guess this has historical reason: SetWindowAttrs didn't exist in OS 3.x and thus window.class was not able to change WA_Zoom after opening the Intuition window.
What happens if you call SetWindowAttrs(WA_Zoom) on the window pointer returned by WM_OPEN?
Re: Setting WA_Zoom
Posted: Tue May 14, 2013 1:42 pm
by Rigo
The problem with that, is that you are bypassing the Object, so the Zoom dimensions will not be stored by the object. It may, or may not be a problem, not sure.
It would be easy enough to change window.class to accept WA_Zoom in OM_SET, but discovering the ramifications of that could be time consuming unless someone comes up with a good test case.
Simon
Re: Setting WA_Zoom
Posted: Thu May 16, 2013 6:55 pm
by chris
Rigo wrote:The problem with that, is that you are bypassing the Object, so the Zoom dimensions will not be stored by the object. It may, or may not be a problem, not sure.
Since that's what I tried, and it didn't change anything, I'm guessing it does need to be stored in the object itself.
WA_WindowBox isn't an option, as that changes the current dimensions of the window, whereas I'm only interested in changing the dimensions for current/future "zooms".