In message <5065000000080000006CD70000-1079395200000@exchange.ni.com>,
Ryykker writes
>Is anyone aware of a function, or a short series of functions that can
>be used to completely block any user input (keyboard or mouse) during
>portions of an execution. i.e. I am interested in setting and
>unsetting this condition during runtime. (I am using windows 2000)
>Thanks
In the user interface library;
SetPanelAttribute (, ATTR_DIMMED, );
SetCtrlAttribute (, , ATTR_DIMMED, );
SetMenuBarAttribute (, , ATTR_DIMMED, );
In the programmers toolkit;
SetAttributeForCtrls (,ATTR_DIMMED , , 1);
I usually create a function that takes a single integer argument to set
or clear the protection for a number of panels or controls.
E.G.
/* State is zero or one */
void
preventUserAccess(int state)
{
SetPanelAttribute (, ATTR_DIMMED, state);
SetCtrlAttribute (, , ATTR_DIMMED, state);
SetMenuBarAttribute (, , ATTR_DIMMED, state);
// etc.......................
}
--
Regards,
John Cameron.
Type softly, read gently.