| 2047 | |
| 2048 | |
| 2049 | ResultType GuiType::ControlGetTab(ResultToken &aResultToken, GuiControlType &aControl, ValueModeType aMode) |
| 2050 | { |
| 2051 | LPTSTR buf = aResultToken.buf; |
| 2052 | LRESULT index = TabCtrl_GetCurSel(aControl.hwnd); // Get index of currently selected item. |
| 2053 | if (aMode == Value_Mode || (aMode == Submit_Mode && (aControl.attrib & GUI_CONTROL_ATTRIB_ALTSUBMIT))) // Caller wants the index, not the text. |
| 2054 | _o_return((int)index + 1); // 0 if no selection. |
| 2055 | if (index == -1) // There is no selection. |
| 2056 | _o_return_empty; |
| 2057 | // Otherwise: Get the stored name/caption of this tab: |
| 2058 | TCITEM tci; |
| 2059 | tci.mask = TCIF_TEXT; |
| 2060 | tci.pszText = buf; |
| 2061 | tci.cchTextMax = _f_retval_buf_size-1; // MSDN example uses -1. |
| 2062 | if (TabCtrl_GetItem(aControl.hwnd, index, &tci)) |
| 2063 | _o_return_p(buf); |
| 2064 | _o_return_empty; |
| 2065 | } |
| 2066 | |
| 2067 | |
| 2068 | ResultType GuiType::ControlGetWindowText(ResultToken &aResultToken, GuiControlType &aControl) |
nothing calls this directly
no outgoing calls
no test coverage detected