On 24 Jan 2011, at 16:52, Norman Dunbar wrote:

>> 
>> 1. The expected use of the hit routine is to call WM_MHIT by JMP WM_MHIT(A2).
> Yes, I read that - I don't understand why, if this is the case, I can
> have a hit routine that is expected to jump back into the WMAN code to
> handle it internally. Why not just call WM_MHIT internally anyway?
> 

The definition of each application window has a pointer to its hit routine. 
Users can use that either to call WM_MHIT directly or to do something else. 
This is more flexible than simply having WM_MHIT called internally.

>> 2. The manual says that WM_RPTR does, among a lot of other things -
>>      "if in application window
>>              call hit routine
>>              next read pointer"
>> 
>> A program in which ahit0 prints "HIT" on a "hit" (SPACE) and resets the 
>> application window on a "DO" (ENTER) but ignores everything else looks 
>> normal in execution but shows the constant reentering of ahit0 when run 
>> under QMON.
> Yes, My original posting showed a test hit routine that I am using. It
> shows exactly how many times the hit routine is called for an
> application sub-window! Just moving the pointer over the window causes a
> lot of hits!
> 
> Still, I'm learning new stuff!
> 
> I suppose that a PE application could be written in such a way as to use
> a SCR_ channel for normal program output (my HIT counter for example)
> rather than using a dedicated sub-window, however, I'm not sure what
> would happen if I did so, and then moved it around the screen!
> 

I would not advise this! You may not be able to set this new window outside the 
limits already set by the PE software. That is, however you define the SCR 
window, it may appear inside the current PE limits of your program.

> I have a funny feeling I'd end up still writing to the previous location!
> 
> Maybe an information window would be a better idea. Worth investigating
> I suspect.
> 

I am sure that information windows are a better bet. However, with an 
application window you have the possibility of having a different pointer for 
your window. That would be more difficult for an information window. I think I 
almost always use information windows for displaying - - - er - - information.


George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to