| 1654 | |
| 1655 | |
| 1656 | ResultType GuiType::ControlGetDDL(ResultToken &aResultToken, GuiControlType &aControl, ValueModeType aMode) |
| 1657 | { |
| 1658 | LRESULT index; |
| 1659 | if (aMode == Value_Mode || (aMode == Submit_Mode && (aControl.attrib & GUI_CONTROL_ATTRIB_ALTSUBMIT))) // Caller wants the position, not the text. |
| 1660 | { |
| 1661 | index = SendMessage(aControl.hwnd, CB_GETCURSEL, 0, 0); // Get index of currently selected item. |
| 1662 | // If there's no item selected (the default state, and also possible by Value:=0 |
| 1663 | // or Text:=""), index is -1 (CB_ERR). Since Value:=0 is valid and Value:="" |
| 1664 | // is not, return 0 in that case. MSDN: "If no item is selected, it is CB_ERR." |
| 1665 | _o_return((int)index + 1); |
| 1666 | } |
| 1667 | return ControlGetWindowText(aResultToken, aControl); |
| 1668 | } |
| 1669 | |
| 1670 | |
| 1671 | ResultType GuiType::ControlGetComboBox(ResultToken &aResultToken, GuiControlType &aControl, ValueModeType aMode) |
nothing calls this directly
no outgoing calls
no test coverage detected