TIP: Click on subject to list as thread! ANSI
echo: pascal
to: MARK LEWIS
from: KIM FORWOOD
date: 1998-04-15 04:17:00
subject: Re: Locking High Intensity

mark lewis wrote: 
 KF>> Does anyone know how I can force high intensity to stay on
 KF>> when it's been set in a child program and you return to the
 KF>> parent program?
 
 ml>> any method you may try is unreliable at best...
 
 KF> Why so?
 ml> i was thinking of the parent program saving all settings and restoring
 ml> them upon return... 
It resets the mouse, cursor, and high intensity, then sets them again
after the child ends.
 KF>> My child program is executed in a window (text mode) within
 KF>> the parent program's screen, and the high intensity colors
 KF>> of the parent screen flicker when the child ends and control
 
 KF> Yup, I'm wrapping the ExecWinWithSwap routine on either side
 KF> with a call to SwapVectors.
 ml> that should be ok, then... swapvectors causes the interrupt vectors to
 ml> be put back like they were at program startup... 
Yup, I understand that.
 KF> I wrote both the parent and child programs. The high intensity
 KF> was left on when calling the child program, but was being
 KF> turned on at the start of the child program and then off again
 KF> at the finish. That was the problem. I had been looking at the
 KF> wrong copy of one of my units or something. 
 ml> hehehe, that can cause a seeing man to go blind, ya know? >
It was a stumper for a while. Then I realized that the order that my
unit paths were listed in TP.CFG needed to be changed since I had
copied all the source files from my main unit directory into the
project's directory so I could customize them for the project, but TPC
was still looking in the main directory first and using the original
copies there.
 
 KF> Anyway, now I have the problem of figuring out how the child
 KF> program will know that it's being executed as a child. This
 KF> is important, because if the child is now run on it's own
 KF> (not as a child), it won't have high intensity, since that's
 KF> handled by the parent, but it now blinks when run on it's own.
 KF> Not good either!
 ml> command line param... or possible use the ICA (inter communications
 ml> area)... ICA isn't all that big... 16 bytes i think... i'm not sure
 ml> about support on all platforms, either... as i recall, gateway decided
 ml> a while back that it wasn't being used by anyone and started using it
That might be a good idea if I could assure that it wouldn't be used
by anything else.
 KF> So how can I tell if a program is executed as a child of
 KF> another program? I thought of looking at the CMDLINE
 KF> environment variable, but this won't work well since to
 ml> for one thing, CMDLINE is only available in OS/2 AFAIK... why compare?
No it's not... unless 4DOS is adding it here (possible). I'll have to
check.
 ml> you say the child must be renamed to operate standalone so why not
 ml> simply look at paramstr(0) and be done with it? if it's the
 ml> childprocess name, great, it a childprocess... otherwise, no matter
 ml> what other name it is given, it must be in standalone mode... or am i
 ml> missing something else? 
Hmmm... am I getting confused or what? Too many late nights at the
keyboard again, no doubt. Of course your idea will work.
Thanks...
Kim Forwood
--- Blue Wave/DOS v?.??
---------------
* Origin: The Eclectic Lab (1:153/831)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.