MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ControlGetCheck

Method ControlGetCheck

source/script_gui.cpp:1607–1623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605
1606
1607ResultType GuiType::ControlGetCheck(ResultToken &aResultToken, GuiControlType &aControl)
1608{
1609 switch (SendMessage(aControl.hwnd, BM_GETCHECK, 0, 0))
1610 {
1611 case BST_CHECKED:
1612 _o_return(1);
1613 case BST_UNCHECKED:
1614 _o_return(0);
1615 case BST_INDETERMINATE:
1616 // Seems better to use a value other than blank because blank might sometimes represent the
1617 // state of an uninitialized or unfetched control. In other words, a blank variable often
1618 // has an external meaning that transcends the more specific meaning often desirable when
1619 // retrieving the state of the control:
1620 _o_return(-1);
1621 }
1622 return FAIL; // Shouldn't be reached since ZERO(BST_UNCHECKED) is returned on failure.
1623}
1624
1625
1626ResultType GuiType::ControlSetChoice(GuiControlType &aControl, LPTSTR aContents, ResultToken &aResultToken, bool aIsText)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected