Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site wanginst.UUCP
Path: utzoo!linus!wanginst!vishniac
From: vishniac@wanginst.UUCP (Ephraim Vishniac)
Newsgroups: net.micro.mac
Subject: Is My Thumb an Indicator?
Message-ID: <1283@wanginst.UUCP>
Date: Wed, 6-Nov-85 09:21:40 EST
Article-I.D.: wanginst.1283
Posted: Wed Nov  6 09:21:40 1985
Date-Received: Fri, 8-Nov-85 07:22:45 EST
Distribution: net
Organization: Wang Institute, Tyngsboro, Ma.  01879
Lines: 38

This is a technical query about action procedures for controls.  That
said, most of you can stop reading, unless you want to know what my
thumb has to do with anything.

According to the Control Manager chapter of IM, the action proc for
a particular control will be called repeatedly as long as the mouse is
down in some part of the control.  True enough, it will.  It also says
that there are two flavors of action procs, depending on whether or not
the control is an "indicator".  If it is, the action proc is a parameterless
procedure (no arguments, no return value).  If not, the action proc
receives the control handle and part code as arguments.  IM points out
that it's important to know what kind of control you're dealing with,
since "obviously" your action proc can only be of one type or the other.

My problem: when I mouse down in the scrolling or paging regions of my
scrollbar, my action proc is called exactly as advertised with the
appropriate handle and part code on the stack.  When I mouse down in the
thumb (the little square item that shows the scroll bar position), my
action proc is called without parameters as though the thumb were an indicator!
Since I'm writing in assembler, I can deal with this, but I'd still like
to know what's going on here.  I'd be in serious trouble if I were using
a compiled language and couldn't muck with the stack.

Has anyone run into this curiosity?  Has anyone used a scrollbar action
proc and *not* run into this?

I can post source if necessary for further discussion.  The scrollbar itself,
BTW, is built in RMaker as a CTRL resource and referred to a resource control
item in the DITL of the current DLOG.  The DLOG is running under _ModalDialog.

Ephraim Vishniac
  [apollo, bbncca, cadmus, decvax, harvard, linus, masscomp]!wanginst!vishniac
  vishniac%Wang-Inst@Csnet-Relay

-- 
Ephraim Vishniac
  [apollo, bbncca, cadmus, decvax, harvard, linus, masscomp]!wanginst!vishniac
  vishniac%Wang-Inst@Csnet-Relay