本文整理汇总了C++中CFX_WideString::Compare方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_WideString::Compare方法的具体用法?C++ CFX_WideString::Compare怎么用?C++ CFX_WideString::Compare使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_WideString
的用法示例。
在下文中一共展示了CFX_WideString::Compare方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnCalculate
void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField) {
CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
ASSERT(pEnv);
if (!pEnv->IsJSInitiated())
return;
if (m_bBusy)
return;
m_bBusy = TRUE;
if (!IsCalculateEnabled()) {
m_bBusy = FALSE;
return;
}
IJS_Runtime* pRuntime = m_pDocument->GetJsRuntime();
pRuntime->SetReaderDocument(m_pDocument);
int nSize = m_pInterForm->CountFieldsInCalculationOrder();
for (int i = 0; i < nSize; i++) {
CPDF_FormField* pField = m_pInterForm->GetFieldInCalculationOrder(i);
if (!pField)
continue;
int nType = pField->GetFieldType();
if (nType != FIELDTYPE_COMBOBOX && nType != FIELDTYPE_TEXTFIELD)
continue;
CPDF_AAction aAction = pField->GetAdditionalAction();
if (!aAction.GetDict() || !aAction.ActionExist(CPDF_AAction::Calculate))
continue;
CPDF_Action action = aAction.GetAction(CPDF_AAction::Calculate);
if (!action.GetDict())
continue;
CFX_WideString csJS = action.GetJavaScript();
if (csJS.IsEmpty())
continue;
IJS_Context* pContext = pRuntime->NewContext();
CFX_WideString sOldValue = pField->GetValue();
CFX_WideString sValue = sOldValue;
FX_BOOL bRC = TRUE;
pContext->OnField_Calculate(pFormField, pField, sValue, bRC);
CFX_WideString sInfo;
FX_BOOL bRet = pContext->RunScript(csJS, &sInfo);
pRuntime->ReleaseContext(pContext);
if (bRet && bRC && sValue.Compare(sOldValue) != 0)
pField->SetValue(sValue, TRUE);
}
m_bBusy = FALSE;
}