ADC Home > Reference Library > Technical Notes > Legacy Documents > Graphics & Imaging >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Custom WDEF and wDraw

CONTENTS

This Technical Note explains why custom window definition functions may not respond to a wDraw message from the system (if you follow the documentation in Inside Macintosh).

[Feb 01 1991]






Problem & Solution

Inside Macintosh, Volume I-299, documents the declaration of the window definition function (WDEF) as follows:

    FUNCTION MyWindow(varCode: INTEGER; theWindow: WindowPtr; message:

On the first examination of the parameters, one may assume param always contains a long value; however, when the system is calling the WDEF with message = wDraw, it only stores a short value in param without clearing the high-order word of param. If the high-order word contains any value other than zero, the content of param is different from what the WDEF expects.

For the custom WDEF to work correctly, it should use only the low-order word of param when message = wDraw.


Note:
This problem exists in all systems up to and including System Software 7.0. The suggested fix is valid for all of these systems.


Back to top

Downloadables

Acrobat gif

Acrobat version of this Note (40K).

Download



Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.