| 9009 | |
| 9010 | |
| 9011 | ResultType DetermineTargetWindow(HWND &aWindow, ResultToken &aResultToken, ExprTokenType *aParam[], int aParamCount, int aNonWinParamCount) |
| 9012 | { |
| 9013 | if (aParamCount > 0) |
| 9014 | { |
| 9015 | auto result = DetermineTargetHwnd(aWindow, aResultToken, *aParam[0]); |
| 9016 | if (result != CONDITION_FALSE) |
| 9017 | { |
| 9018 | if (result == OK && !aWindow) |
| 9019 | return aResultToken.Error(ERR_NO_WINDOW, ErrorPrototype::Target); |
| 9020 | return result; |
| 9021 | } |
| 9022 | } |
| 9023 | TCHAR number_buf[4][MAX_NUMBER_SIZE]; |
| 9024 | LPTSTR param[4]; |
| 9025 | for (int i = 0, j = 0; i < 4; ++i, ++j) |
| 9026 | { |
| 9027 | if (i == 2) j += aNonWinParamCount; |
| 9028 | param[i] = j < aParamCount ? TokenToString(*aParam[j], number_buf[i]) : _T(""); |
| 9029 | } |
| 9030 | aWindow = Line::DetermineTargetWindow(param[0], param[1], param[2], param[3]); |
| 9031 | if (aWindow) |
| 9032 | return OK; |
| 9033 | return aResultToken.Error(ERR_NO_WINDOW, param[0], ErrorPrototype::Target); |
| 9034 | } |
| 9035 | |
| 9036 | |
| 9037 | ResultType DetermineTargetControl(HWND &aControl, HWND &aWindow, ResultToken &aResultToken, ExprTokenType *aParam[], int aParamCount |
no test coverage detected