Re: Nested Wimp



In message <e7aefff34d.colin@colin/granville.gmx.co.uk>
Colin Granville <colin.granville@xxxxxxxxx> wrote:

In message <d38eeaf34d.root@xxxxxxxxxxxxxxxx>
Erik Groenhuis <erikgspm@xxxxxxxxxxxx> wrote:

As Colin Granville <colin.granville@xxxxxxxxx> wrote:

On a window open event for the main window:

1) take note of the behind window_handle.

2) make the behind window_handle the main window_handle (ie
open it behind itself) and open the window.

3) read the state of the main window. (only necessary if using
the toolbox. If using templates the open window data will
modified to the current state when the window is opened)

4) Open the pane using main window_state to position it but set
behind to the original behind window_handle (from (1)).

5) if you have another pane use the pane window_handle from (4)
as behind and open that window

6) Open the main window again with the data from (3) and using
the window_handle of the last pane opened as the behind
window_handle.

And now we're back in the realm of clever opening of the windows to get
the pane to appear at the right position on top of the main window.

I was just pointing out how to do it without the nested wimp as the
person I replied to was having problems.

See <http://www.pinknoise.demon.co.uk/Docs/Arc/Wimp/pane.c.html>.

looks complicated to me.

You don't need to make exceptions for different values of behind it's
simple enough

open window behind self
open pane behind original behind
open window behind pane

Seeing how the extra flags in the nested window manager are supposed to
attach the pane to the main window, and the parent window handle is
passed in R3, all the above should be unnecessary. I would expect it to
be handled automatically by the nested window manager.

Note, by the way, that for the extra flags word in Wimp_OpenWindow (at
R1 + 32) to work, bit 0 in R4 must be set.

Yes you can use the nested wimp but for a simple single toolbarstyle
pane in a window it's hardly matters which one you use.

It is easier with the nested wimp, sufficiently so to be worth doing for
even a simple pane I would suggest.

It took me a while to get it working, because I got confused about how to
pass TASK in R2.

"Wimp_OpenWindow",,"TASK", doesn't work

DIM magic%
$magic%="TASK"+CHR$(0)
"Wimp_OpenWindow",,magic%, doesn't work

DIM magic% 5
$magic%="TASK"+CHR$(0)
"Wimp_OpenWindow",,!magic%, does work

magic%=&4B534154
"Wimp_OpenWindow",,magic%, does work

Note that none of the above produce an error message - the non-working ones
just don't produce nested wimp behaviour.

What I have got to work is:

Load both windows from template
Create and Open main window, with R2=TASK, R3=-1, R4=0

Find the position of the space for the pane, and apply it to pane.
(without this step, it works provided the windows were correctly positioned
in the template file, and the main window doesn't get repositioned when it
opens, due to partly being off screen etc.)

Set the byte at R2+32 to &FF to suppress the line round the pane
Create and Open pane window, with R2=TASK, R3=handle of main, R4=align%
where:
align%=%01<<16: REM child left to visible left
align%+=%10<<22: REM child top to visible top

In response to open window messages, open the main window with R2=TASK,
R3=-1, R4=0

The only other thing required, and it is required with and without the
nested wimp, is to handle the scroll events, and scroll vertically by an
amount reduced to take accoumt of the area hidden by the pane.

It is essential that the width of the pane is exactly the same as the
visible area of the main window, otherwise when the main window is scrolled
horizontally the pane scrolls by a different amount.

That's it. It just took a bit of working out to find the necessary steps.

--
Alan Adams, from Northamptonshire
alan.adams@xxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.nckc.org.uk/
.



Relevant Pages

  • Re: Header details
    ... OETool from www.oehelp.com will allow you read the complete headers ... in a message even thought it's not displayed in the Preview Pane. ... > in either the Preview pane or in a message's own window. ... > always opens on the right. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: IE 6 search problem
    ... Google's my default here and the results do not open in a "Side Pane" nor have I ever seen such a Search "Side Pane" since IE7 Beta1. ... When I click on the Search button, the Search pane opens ... window it opens in the search window itself instead of the right-hand ... Is MS forcing updates to Win98SE without the users approval ??? ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: news group repys
    ... reading newsgroup messages in Preview pane is very, ... Are You Ready for WinXP SP2? ... > What I want to do is open all the replies for a topic in one window. ... > topic, I click on the first reply, it opens in it's own window, I read ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Nested Wimp
    ... I struggled for ages with a pane that didn't shrink when the main window was ... in the nested wimp it did shrink. ...
    (comp.sys.acorn.programmer)
  • RE: assign a symbol to a shortcut key
    ... Open the VBA editor, find your desired workbook in the left pane. ... A new window opens on the right hand ... In the window that opens, ...
    (microsoft.public.excel.misc)

Loading