I don't have an answer, but I do have a couple
of suggestions.
Instead of "startPoint = (*startPtP);" try using
MemCopy. Does the behavior change?
Also, I saw a later message suggesting that
the Snd calls were overlapping and masking
out the initial alarm sound. I seem to recall
something similar. Try using an alert instead
of sounds for your diagnostics.
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
Jacob Vitas Vogelstein wrote in message <[EMAIL PROTECTED]>...
>
>The way I see it, this is impossible. Another option is that I am just
>stupid. I'll give you 2:1 odds on impossible, though. Well, maybe 1:1.
>Here goes:
>
>In my hack for the SysProcessSoftkeyStroke, the function recieves two
>parameters: PointType *startPtP and PointType *endPtP. Immediately upon
>entering the function, have the following lines:
>{
>PointType startPoint;
>PointType endPoint;
>
>if (startPtP->x == endPtP->x)
> SndPlaySystemSound(sndAlarm);
>
>startPoint = (*startPtP);
>endPoint = (*endPtP);
>
>if (startPtP->x == endPtP->x)
> SndPlaySystemSound(sndError);
>if (startPoint.x == endPoint.x)
> SndPlaySystemSound(sndError);
>}
>
>The result is no alarm, then 2 beeps. That means that startPtP.x does not
>equal endPtP.x until after I assign the variables startPoint and endPoint
to
>the values of *startPtP and *endPtP. It gets weirder:
>
>The following code does work:
>{
> SWord startX; // for some reason, I need to save the values of startPtP
>and
> SWord startY; // endPtP and pass the address to my own PointType
>variables
> SWord endX; // if I want to call the original trap. I dont know why,
>but
> SWord endY; // it works.
>
>if (startPtP->x == endPtP->x)
> SndPlaySystemSound(sndAlarm);
>
> startX = startPtP->x;
> startY = startPtP->y;
> endX = endPtP->x;
> endY = endPtP->y;
>
>if (startPtP->x == endPtP->x)
> SndPlaySystemSound(sndError);
>if (startX == endX)
> SndPlaySystemSound(sndError);
>}
>
>Here I get no sounds whatsoever. Apparently, accessing the variables by
>reference as opposed to by value is ok, but the reverse causes them to be
>reinitialized to zero or something. I dunno.
>
>First one to figure this out gets a big prize!
>
>
>
>
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/