Version: |
8.0.0 |
Description: |
Directly set a toggle state |
Declaration: |
|
C/C++ |
extern "C" vbool WINAPI VCSetToggleState(WORD id, vbool tfForcedState); |
Delphi |
function VCSetToggleState(id: Word; tfForcedState: WordBool): WordBool; stdcall; |
ActiveX/COM |
Function SetToggleState(ByVal id As Integer, ByVal tfForcedState As Integer) As Integer |
Parameters: |
id - the ID of the toggle to set |
Return Value: |
The previous state of the toggle |
iError Code: |
0 - Success |
Notes: |
Prior to v8.0.0, setting a toggle required calls to VCGetToggleState to get the toggle then, if necessary, another call to either VCToggle or VCGetToggleState to toggle or reverse it. VCSetToggleState is a direct way to set a toggle, including restoring the previous state of the toggle. |
See Also: |