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.
Setting WA_Zoom
Re: Setting WA_Zoom
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
Simon
- thomasrapp
- Posts: 318
- Joined: Sun Jun 19, 2011 12:22 am
Re: Setting WA_Zoom
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?
What happens if you call SetWindowAttrs(WA_Zoom) on the window pointer returned by WM_OPEN?
Re: Setting WA_Zoom
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
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
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.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.
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".