🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
3 messages
3 total messages Started by Juha Ruotsalainen ti Wed, 10 Oct 1990 12:39
Problems with LN_ENTER & DID_OK
#1562
Author: Juha Ruotsalainen ti
Date: Wed, 10 Oct 1990 12:39
32 lines
1607 bytes
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 ??===============================
Re: Problems with LN_ENTER & DID_OK
#1567
Author: Lawrence W Salomon
Date: Thu, 11 Oct 1990 14:15
13 lines
1167 bytes
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,
Q
Re: Problems with LN_ENTER & DID_OK
#1572
Author: Steve Resnick
Date: Thu, 11 Oct 1990 16:21
19 lines
1216 bytes
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
----------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads