Page 1 of 1

QPTR Toolkit Window Redefine

Posted: Thu Feb 06, 2020 8:16 pm
by Derek_Stewart
Hi,

I have been looking at the QPTR Toolkit, which has some example programmes to open a QPTR Window, place some loose items, allow moving of the primary window.

I do not see an QPTR Toolkit function to allow changing the dimensions of the primary window.

I thought about changing the initial parameters of the primary window, but this does not seem the right way to do this.

Can anyone help here?

Re: QPTR Toolkit Window Redefine

Posted: Thu Feb 06, 2020 8:36 pm
by pjw
Without more details its hard to say. You may have to poke the scaling flags into your window definition. Then use CH_WIN to make the changes.
QPTR is a hard slog, although the documentation is invaluable. EasyPtr is much easier to use!
Wolfgang only uses Qptr, I believe, so he's the one to ask ;) Or look at some of his programs. Usually the source code is included.

Re: QPTR Toolkit Window Redefine

Posted: Thu Feb 06, 2020 9:06 pm
by tofro
Derek,

In principly, a PE window (if that's what you're asking) is resized just like any other QDOS window: Using WINDOW in S*Basic or some form of command that in essence boils down to a SD.WDEF trap. This will resize the window, as long as it fits into the available outline.

When the QPTR toolkit was designed, there was no way to resize menu definitions (If that is what you're asking). The only way to write applications with menus that can change their size, was to provide various menu definitions like "small", "medium", "large", and have WMAN decide initially which fits best for your requested window size.

Scalable windows were introduced later - In the menu definition, you have to set the scaling flags to allow the window manager to re-size a window outside fixed boundaries. Once that is done, you can resize the menu with the CH_WIN QPTR PROCedure.

Today, I would not recommend to even look at QPTR toolkit anymore (Wolfgang might probably disagree...) - It is way too cumbersome to write applications with it, EasyPTR is much easier (hence the name ;) ).

Tobias

Re: QPTR Toolkit Window Redefine

Posted: Thu Feb 06, 2020 9:30 pm
by Derek_Stewart
Hi,

I think you are correct, in that EasyPTR is the seat way to do to resize a PE window.

I was just trying to understand the QPTR Toolkit documentation.

Re: QPTR Toolkit Window Redefine

Posted: Thu Feb 06, 2020 9:51 pm
by NormanDunbar
Derek_Stewart wrote:I was just trying to understand the QPTR Toolkit documentation.
Many have tried Derek! ;)