Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #1026
| From | Martin Bazley <martin.bazley@blueyonder.co.uk> |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: Use (and abuse) of Wimp_CreateMenu |
| Message-ID | <74fdc53252.martin@blueyonder.co.uk> (permalink) |
| References | <mpro.luq5r704nn0sw01lc.news@stevefryatt.org.uk> |
| Organization | virginmedia.com |
| Date | 2011-11-16 00:19 +0000 |
The following bytes were arranged on 15 Nov 2011 by Steve Fryatt : > It's standard practice (and documented in the PRM) that following receipt of > a menu selection event to Wimp_Poll, calling Wimp_CreateMenu again will > repoen the existing menu structure in the position that it was in when the > selection occurred. I've always strongly suspected that this is accomplished by means of an extremely crude hack in the Wimp such as poking cached submenu states into the first call of Wimp_CreateMenu. It wouldn't be without precedent - see, for example, Wimp_RedrawWindow's stipulation that "it must be the first Wimp call after Wimp_Poll". Here's another example to try: if you respond to an Adjust-click by calling Wimp_CreateMenu with *different* x and y coordinates, does it work? (NB: I have no idea what the answer is.) > So: does anyone know if a menu's ticked/shaded state can be changed while > it's open but *not* on a menu selection? And if it can, how does one do it? Just clutching at straws here, but have you considered first altering the data structure contents and then using Wimp_ForceRedraw? This assumes some method of persuading the Wimp to divulge the coordinates of a submenu, of course, which I can't think of off the top of my head. > Is it just a case of calling Wimp_CreateMenu with the same handle as > the currently open menu again? There's no such thing as a 'menu handle', only a static pointer to a menu data structure, and I don't think the Wimp keeps track of them anywhere, so it'll be as if the user changed their mind and clicked Menu at some completely different coordinates. I too have found this rather irksome in the past. -- __<^>__ "Start off every day with a smile and get it over with." / _ _ \ - W.C. Fields ( ( |_| ) ) \_> <_/ ======================= Martin Bazley ==========================
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Use (and abuse) of Wimp_CreateMenu Steve Fryatt <news@stevefryatt.org.uk> - 2011-11-15 23:11 +0000
Re: Use (and abuse) of Wimp_CreateMenu Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-11-16 00:19 +0000
Re: Use (and abuse) of Wimp_CreateMenu Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-11-16 00:51 +0000
csiph-web