so-ecs@stekt.oulu.fi (Juha Ruotsalainen ti) (10/10/90)
Question #1:
Why API-calls use stack instead of registers?
Question #2:
I my program I have a dialog box which has one list box(in
which drives, directories and files are listed) and Enter and
Cancel pushbuttons.
The problem arises when I am scrolling thru the list and
press <ENTER> when I want to change drive/directory or read in a
file. Enter generates LN_ENTER which I process and DID_OK
which I process. But there is no need for processing the
DID_OK msg, because both call the same subroutine.
At the moment I have a flag indicating whether to process
DID_OK and it works. Fine.
BUT in the sample program(graphic2) which came with Toolkit
there are no flags.
What do I do wrong ?
I hope there is someone who can help me...
-Jussi-
--
===E.C.Stone or J.Ruotsalainen=========Internet : so-ecs at stekt.oulu.fi===
When I feel myself slowing down , I know for sure that I've been
here before, 'cause if it isn't an action replay, what else could it be.
============================Klaustrofobiaako ??===============================lsalomo@omni.uucp (Lawrence W Salomon) (10/11/90)
1: I think that it has something to do with protect mode and stack switching
when a function gate is invoked.
2: I'm not sure what you are asking. If you are stating that when you have
a default pushbutton and the listbox has the focus when enter is pressed,
that a WM_COMMAND/DID_OK and WM_CONTROL/LN_ENTER get generated, then you
are correct (in 1.2, that is). I never really bothered to try and get
around this, but what you could do is take out the default pushbutton
and generate the WM_COMMAND/DID_OK yourself (say, when ENTER was pressed
and a FILE was highlighted.).
Cheers,
Qstever@Octopus.COM (Steve Resnick ) (10/11/90)
In article <SO-ECS.90Oct10133953@stekt.oulu.fi> so-ecs@stekt.oulu.fi (Juha Ruotsalainen ti) writes: >Question #1: > Why API-calls use stack instead of registers? > To be compatible with High-level language calling sequence (Pascal) To allow the passage of more parameters and data structures than would be available in registers To be re-entrant. Cheers! Steve -- ---------------------------------------------------------------------------- steve.resnick@f105.n143.z1.FIDONET.ORG - or - apple!camphq!105!steve.resnick Flames, grammar errors, spelling errrors >/dev/nul ----------------------------------------------------------------------------