Dilwyn Jones makes some magical things to make me read

} > I've got no clue of C68 or assembly programming but I know that what
} you describe, is NOT the
} > normal case. I have been using EasyPtr (Albin Hessler) for years now
} and every wanted positioning
} > works very well, before, after resizing, after a wake etc. May be
} you can have a look at the source
} > code of Albin to overcome your problem?!
} 
} Not always. It mostly works, but some of my Easyptr programs do appear
} at almost random positions after certain events. I've tried the
} absolute and relative positionings and can't really pin down a firm
} reason. Obviously seems to depend on what you use and how you do it.

Have you check how the position was provided for these events.
If, for instance, the position is part of the parameters of a function,
beware of the declaration and definition style used.

This is more blatant with latest C68, since there is a different handling
of K&R functions vs ANSI functions.
It has no effect for int and pointer, but for 'short' and other, there
is a difference in stack usage.

Example: you declare a function like
 int foo();

and then used it.
 result=foo(first,next);

But the definition of foo is done later or elsewhere and is something like :
 int foo(short x, short y)
{
....
}

Then you are in trouble because the usage of foo will use 8 bytes (2 long word),
whereas the definition will use only 4 consecutive bytes from the stack.

The same kind of trouble can also append if:
 - declaration is ANSI, while definition is K&R
 - no declaration, definition ANSI style.


For illustration, get the PE demo code for C68 (from Thierry site),
and make the various program. Most will works fine, excepted the ones
which plot a point on the application windows. 
The cause is just because of the style used (K&R) for the callback,
whereas the current C68 PE library is expected ANSI style.
Correction is easy, once you know why it fails!

Reply via email to