• Re: Wimp_SetExtent (&400D7)

    From narrowboatpaul@gmail.com@21:1/5 to Stewart Brodie on Sun Feb 13 14:34:02 2022
    On Tuesday, August 4, 1998 at 8:00:00 AM UTC+1, Stewart Brodie wrote:
    In message <na.264f8e4870....@argonet.co.uk>
    Everymans Wine <ever...@argonet.co.uk> wrote:
    In article <486FE03048%sbr...@acorn.com>, Stewart Brodie
    <sbr...@acorn.com> wrote:
    :) I am aware of with Wimp_SetExtent is that the extent you set must
    :) encompass
    :) the currently visible work area of the window.

    So hang on a mo... I can't make a window any _bigger_ than it already is, only smaller. In that case I would have to delete the window and recreate it with a larger work area if I wanted a bigger one.
    No, the other way around. If you want to make it smaller so that the currently visible work area does not lie within the window extent, then you have to re-open the window at an appropriate smallness or close then re-open it etc.
    If you are making the window bigger, then there is no problem.
    I forget if you mentioned this before, but if you do have access to the PRMs, then you should re-read page 3-164 and 3-165 (and possible pages 3-10 to 3-14 which describe the layout of windows).
    To make it clear:

    -My window has a vertical scroll bar.
    -When it is first opened the widow is set to a length and the inner part of the vertical scroll bar is at full length (i.e. you can't scroll)
    -If someone drags an app to the window the _area_ of the window should be increased but the window doesn't get any bigger on screen, the scroll bar is just redrawn to show that you can now scroll to another part of the window. This is utillised to great effect in VTi's Voyager email and newsreader apps but I can't get it to work. Is it possible?
    Yes - it's the simplest form of extent changing there is. If you take the top-left hand corner of the document as (0,0) (which is the commonest thing to do under RISC OS)with negative Y co-ordinates going down the screen and positive X co-ordinates running to the right, then you need to decrease the minimum Y.
    BASIC code to increase the vertical size of such a window by 40 units:
    DIM winfo_block% 92
    !winfo_block% = window_handle%
    SYS "Wimp_GetWindowInfo", ,winfo_block% + 1
    winfo_block%!48= (winfo_block%!48) - 40
    SYS "Wimp_SetExtent",window_handle%,winfo_block%+44
    Hmm. maybe I should have used something more readable. Anyway, that's it.

    Have to say have just found this old discussion thread very interesting an informative.

    Just goes to show how useful Google Groups can be when looking for examples!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)