Paul Sprangers
2022-04-16 10:57:03 UTC
[This topic is a spin off from elsewhere]
indeed. Before calling Wimp_RedrawWindow, I do a Wimp_GetWindowInfo
call. Should I really move that one after the redraw call?
What details do you need to find from Wimp_GetWindowInfo to perform the
redraw, that you don't get in the block returned by Wimp_RedrawWindow and
Wimp_GetRectangle?
Horribly wrong in this case means that I get a 'Number too big' error in
another subroutine when opening the application window.
The details that I get from Wimp_GetWindowInfo is the x and y origins of
the window in question:
SYS "Wimp_GetWindowInfo",,block%
ox% = block%!4 - block%!20
oy% = block%!16 - block%!24
However, I noticed that I can move the latter two lines to within the WHILE
more% - ENDWHILE loop and delete the Wimp_GetWindowInfo call, so that the
RedrawWindow call is the first one in the redraw routine. Unfortunately, it
doesn't change anything about some other glitches, that probably have
nothing to do with the redraw routine, but the more so with my general and
ubiquitous flaws.
Paul
When a Wimp_Poll returns reason code 1 (RedrawWindow), then
Wimp_RedrawWindow must be the first Wimp call made, and it should
not be called at any other time.
Ah, now I understand what you mean - and I sin against that ruleWimp_RedrawWindow must be the first Wimp call made, and it should
not be called at any other time.
indeed. Before calling Wimp_RedrawWindow, I do a Wimp_GetWindowInfo
call. Should I really move that one after the redraw call?
redraw, that you don't get in the block returned by Wimp_RedrawWindow and
Wimp_GetRectangle?
If I do, things go horribly wrong.
Define "horribly wrong"... which might help us help you. :-)another subroutine when opening the application window.
The details that I get from Wimp_GetWindowInfo is the x and y origins of
the window in question:
SYS "Wimp_GetWindowInfo",,block%
ox% = block%!4 - block%!20
oy% = block%!16 - block%!24
However, I noticed that I can move the latter two lines to within the WHILE
more% - ENDWHILE loop and delete the Wimp_GetWindowInfo call, so that the
RedrawWindow call is the first one in the redraw routine. Unfortunately, it
doesn't change anything about some other glitches, that probably have
nothing to do with the redraw routine, but the more so with my general and
ubiquitous flaws.
Paul
--
http://riscos.sprie.nl
http://riscos.sprie.nl