Hi Martin,
the easiest solution is to disable the offending buttons. i.e. at the start of the callback that get's called from your button, simply
SetCtrlAttribute(panel,control,ATTR_DIMMED,1);
You can do this for all the buttons you don't want to queue the message of.
I'm not aware of a function to disable callbacks, unless it's the timer callback which can be suspended and resumed.
If you want to get a little more complicated, you can remove the callback pointer from the control through it's attribute
SetCtrlAttribute(panel,control,ATTR_CALLBACK_FUNCTION_POINTER,NULL);
and then re-instate it afterwards (as long as you know the name of the callback function!
The button presses shouldn't be handled until after the function has run. All panel/control events are s
ynchronous callbacks. Windows will still put information into it's message queue for events that have occured on your panel, but if there's not a callback assigned, nothing will be internally queued (to cvi).
The equivalent to DoEvents (VB) would be ProcessSystemEvents() in CVI. You need this because if you're in a lengthy callback, and you need to see what else has gone into the message queue, you can call this to process those items.
Swallowing the event (returning a 1 from a callback function instead of a 0) means that after the first call, the callback doesn't get called again - watch out if you try to swallow events on EVENT_COMMIT - a EVENT_LEFT_CLICK will have already occured and swallowed the event (depending on your program flow).
Hope that helps
S.
// it takes almost no time to rate an answer