Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can the CVI callback return value be used?

109 views
Skip to first unread message

Darren Draper

unread,
Sep 16, 2003, 7:09:45 AM9/16/03
to
In LabWindows/CVI, the callback functions that I generate in my
project are of type int, and by default return the value 0. How is
this return value used, and can it be used for returning any
information?

Heinrich Illig

unread,
Sep 16, 2003, 7:43:42 AM9/16/03
to
Here's the answer, which you can find in the CVI context help:

Swallowing Events
User callbacks must always return 0 unless they intend to swallow the
event to which they are responding. To swallow the event, the callback
should return 1.

Only user input (mouse click and keypress events) and commit events
can be swallowed. If swallowed, no more callbacks are called for that
event. If a user input event is swallowed, the user?s mouse click or
keypress is ignored. If a commit event is swallowed, it is not placed
into the GetUserEvent queue.

Note The following events can be swallowed:

EVENT_COMMIT
EVENT_KEYPRESS
EVENT_LEFT_CLICK
EVENT_LEFT_DOUBLE_CLICK
EVENT_RIGHT_CLICK
EVENT_RIGHT_DOUBLE_CLICK
EVENT_END_TASK
EVENT_MARK_STATE_CHANGE
EVENT_COLLAPSE
EVENT_DRAG
EVENT_DROP
EVENT_EXPAND
EVENT_SELECTION_CHANGE
EVENT_SORT

Regards,
Heinrich Illig
National Instruments

0 new messages