本文整理汇总了C++中CExpression::GetExpressType方法的典型用法代码示例。如果您正苦于以下问题:C++ CExpression::GetExpressType方法的具体用法?C++ CExpression::GetExpressType怎么用?C++ CExpression::GetExpressType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CExpression
的用法示例。
在下文中一共展示了CExpression::GetExpressType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeleteCurExp
long CCompileEditView::DeleteCurExp(WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/)
{
HSTreeToCompileEdit* pppData = (HSTreeToCompileEdit*)lParam;
if(pppData == NULL)
return 0;
CTreeGroup* pTreeGroup = (CTreeGroup*)pppData->m_pName;
if(pTreeGroup != NULL)
{
CExpression* pExpress = pTreeGroup->GetData();
if(pExpress != NULL)
{
CString strName;
strName.Format("%s",pExpress->GetName());
CValue* pValoare;
if ( m_pExternExpression->Lookup(strName,pExpress->GetExpressType(),pValoare) )
{
if( !pExpress->GetPWD().IsEmpty() ) // 有密码
{
CInputPassPwD dlg(this,_T("请输入公式密码"),strName);
dlg.m_pExp = pExpress;
if( dlg.DoModal() == IDCANCEL )
{
return 2;
}
}
if( wParam )
{
m_pExternExpression->RemoveKey(strName,pExpress->GetExpressType());
delete pValoare;
}
}
if(m_pwndDlgMainBar != NULL)
{
CComboBox* pCombox = (CComboBox*)m_pwndDlgMainBar->GetDlgItem(IDC_NAMECOMBO);
if(pCombox != NULL)
{
int nIndex = pCombox->FindString( 0, strName );
if(nIndex != -1)
{
pCombox->DeleteString( nIndex );
}
}
}
}
}
else
{
}
if(m_hExpressInTreePos == (HTREEITEM)pppData->m_pData)
{
OnNewExpress();
}
return 0;
}
示例2: OnLvnItemActivateResultlist
void CDlgFormulaFind::OnLvnItemActivateResultlist(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMITEMACTIVATE pNMIA = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
DWORD dwData = m_wndResultList.GetItemData(pNMIA->iItem);
//发双击在K线处显示消息
//双击指标 将指标发送回外部
if(m_pParentWnd != NULL)
{
m_pParentWnd->SendMessage(HX_USER_DRAGDATA,
HSCurKeyInfo::UpdateExpressData/*HX_USER_DRAGDATA-1*/, (LPARAM)dwData);
if( !m_pParentWnd->IsZoomed() && !m_pParentWnd->IsIconic() )
{
CRect rect,rcDes,rcThis;
CWnd* pDesWnd = GetDesktopWindow();
if( pDesWnd )
{
pDesWnd->GetWindowRect(rcDes);
}
m_pParentWnd->GetWindowRect(rect);
this->GetWindowRect(rcThis);
if( rect.right + rcThis.Width() > rcDes.right )
rect.right = rcDes.right - rcThis.Width();
this->SetWindowPos(NULL,rect.right,rcThis.top,0,0,SWP_NOSIZE);
}
//m_pParentWnd->SetFocus();
}
else
{
CExpression* pExpression = (CExpression*)dwData;
ExpPropery NameProp;
NameProp.m_dExpType = pExpression->GetExpressType();
NameProp.m_strName.Format("%s", pExpression->GetName());
NameProp.m_strDescribe.Format("%s", pExpression->GetDescribe());
NameProp.m_bStyle = pExpression->GetStyle();
if ( g_pFormulaMan )
g_pFormulaMan->SendLinkMsg(DiagramMsg_FormulaParamChanged, (LPARAM)&NameProp);
}
*pResult = 0;
}
示例3: LoadCurExp
long CDlgStrategyParamConf::LoadCurExp(WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/)
{
m_sSingleSel.m_nType = hx_DefMaxValues;
CDlgFormulaMan* pParentDlg = (CDlgFormulaMan*)AfxGetMainWnd();
if( pParentDlg == NULL )
return 0;
EnableItem(FALSE);
if( wParam == CTreeCtrlFormula::YlsBrowser )
{
if(m_nType == 1)
{
CTreeGroup* pTreeGroup = (CTreeGroup*)lParam;
// CString strItem = *(CString*)lParam;
/* if( !strItem.CompareNoCase(CTreeCtrlFormula::g_strUnionCondition) )
{
m_sSingleSel.m_nType = CExpression::Union;
m_sSingleSel.m_strExp.Format("%s",CTreeCtrlFormula::g_strUnionCondition);
m_wndPeriod.ShowWindow(SW_HIDE);
m_wndPeriodStc.ShowWindow(SW_HIDE);
m_wndConNotes.ShowWindow(SW_HIDE);
m_wndCon.ShowWindow(SW_HIDE);
m_wndStaticCon.ShowWindow(SW_HIDE);
m_wndCompare.ShowWindow(SW_HIDE);
m_wndData1.ShowWindow(SW_HIDE);
m_wndAndOr.ShowWindow(SW_HIDE);
m_wndData2.ShowWindow(SW_HIDE);
m_wndMiddle.ShowWindow(SW_HIDE);
}*/
// else if( !strItem.CompareNoCase(CTreeCtrlFormula::g_strJiben) )
/* else*/ if( pTreeGroup->m_dwID == CExpression::JiBenMian )
{
m_sSingleSel.m_nType = CExpression::JiBenMian;
m_sSingleSel.m_strExp.Format("%s",CTreeCtrlFormula::g_strJiben);
m_wndPeriod.ShowWindow(SW_HIDE);
#ifdef _ONLY_SUPPORT_DAYLINE
m_wndPeriod.SetCurSel(0);
#else
m_wndPeriod.SetCurSel(5);
#endif
m_wndPeriodStc.ShowWindow(SW_HIDE);
m_wndConNotes.ShowWindow(SW_SHOW);
m_wndConNotes.SetWindowText(HS_LANGUAGE("财务指标"));
m_wndCon.ShowWindow(SW_SHOW);
m_wndStaticCon.ShowWindow(SW_SHOW);
m_wndCompare.ShowWindow(SW_SHOW);
m_wndData1.ShowWindow(SW_SHOW);
m_wndAndOr.ShowWindow(SW_HIDE);
m_wndData2.ShowWindow(SW_HIDE);
m_wndMiddle.ShowWindow(SW_HIDE);
m_wndData1.ResetContent();
m_wndData2.ResetContent();
m_wndCon.ResetContent();
CDlgCondition::InitCWData(&m_wndCon,YLS_GB_GUBEN_NAME);
CDlgCondition::InitCWData(&m_wndCon,YLS_Cj_GUBEN_NAME);
CDlgCondition::InitCondition(&m_wndCompare,4);
}
}
}
else if( wParam == CCompileEditView::UpdateExpress )
{
CDlgFormulaEdit* pDlg = pParentDlg->GetExpDlg();
if( pDlg != NULL )
{
if(pDlg->SendMessage(HX_USER_LOADCUR,wParam,lParam))
{
pParentDlg->Enable(FALSE);
pDlg->ShowWindowEx(SW_SHOWNORMAL);
}
}
}
else if( wParam == HX_EXPRESSSENTENCE )
{
//EnableItem(FALSE);
CExpression* pExpression = (CExpression*)lParam;
if( pExpression == NULL )
return 0;
//
if(m_nType == 1)
{
m_sSingleSel.m_nType = pExpression->GetExpressType();
//.........这里部分代码省略.........
示例4: FindComp
//查找线程处理函数
DWORD WINAPI CDlgFormulaFind::FindComp(LPVOID pParameter)
{
CDlgFormulaFind* pCompFind = (CDlgFormulaFind*)(pParameter);
if( pCompFind == NULL)
return 0;
CWnd* pWnd = pCompFind->GetDlgItem(IDC_STARTBUTTON);
if(pWnd != NULL)
{
pWnd->EnableWindow(false);
}
pWnd = pCompFind->GetDlgItem(IDC_STOPBUT);
if(pWnd != NULL)
{
pWnd->EnableWindow(true);
}
pCompFind->m_wndAnimate.Play(0,-1,-1);
CString strKey ;
pCompFind->m_wndKeyCombo.GetWindowText(strKey);
strKey.MakeUpper();
// DWORD dwFindMask = pCompFind->GetFindMask();
DWORD dwFindMask = pCompFind->m_nFindMask;
if( dwFindMask == 0 )
return 0;
CListCtrl* pListCtrl = &(pCompFind->m_wndResultList);
if( pListCtrl == NULL)
return 0;
pListCtrl->DeleteAllItems();
CMapVariabile* pVarsMap = CDlgFormulaMan::m_pExternExpression;
if(pVarsMap != NULL)
{
POSITION pos = pVarsMap->GetStartPosition();
pWnd = pCompFind->GetDlgItem(IDC_RESULTSTATIC);
CString sName;
CValue *pVal;
while (pos != NULL && pCompFind->m_bThreadRun)
{
pVarsMap->GetNextAssoc (pos, sName, pVal);
if(pVal != NULL)
{
if( pVal->IsStyle(HX_EXPRESSSENTENCE) )
{
CString strFindText = _T("正在查找 --");
strFindText += ((CExpValue*)pVal)->GetWholeName();
pWnd->SetWindowText( strFindText);
CString strRet;
if( ((CExpValue*)pVal)->Find(strKey,strRet,dwFindMask) )
{
int nCount = pListCtrl->GetItemCount();
CString strText;
strText.Format(TEXT("%d"), nCount+1);
// Insert the item, select every other item.
CExpression* pExpression = ((CExpValue*)pVal)->GetExp();
if(pExpression )
{
DWORD dwMask = (DWORD)pExpression->GetExpressType();
dwMask &= 0xf;
if ((pCompFind->m_dwMask & dwMask) == 0)
{
continue;
}
pListCtrl->InsertItem(
LVIF_TEXT|LVIF_STATE, nCount, strText,
(nCount%2)==0 ? LVIS_SELECTED : 0, LVIS_SELECTED,
0, 0);
pListCtrl->SetItemData(nCount,(DWORD)pExpression);
int nNameIndex = strRet.Find(_T("公式全名"));
int nDescrible = strRet.Find(_T("公式描述"));
if( nDescrible - nNameIndex != 8)
{
CString strDescrible = strRet.Mid(
nNameIndex+8,nDescrible-nNameIndex-8);
pListCtrl->SetItemText(nCount, 2, strDescrible);
}
CString strWholeName = strRet.Left(nNameIndex);
pListCtrl->SetItemText(nCount, 1, strWholeName.Mid(1,nNameIndex));
CString strGroup;
switch( dwMask )
{
case Tech :
{
strGroup = CTreeCtrlFormula::g_strTech;
break;
}
case Exchange :
{
strGroup = CTreeCtrlFormula::g_strExchange;
//.........这里部分代码省略.........
示例5: Compile
//.........这里部分代码省略.........
pExpresie->SetDescribe(strText);
}
pWnd = pDlg->GetDlgItem(IDC_PWDEDIT); // 密码
if(pWnd != NULL && !(pWnd->GetStyle() & WS_DISABLED) )
{
pWnd->GetWindowText(strText);
pExpresie->SetPWD(strText);
}
if(pDlg->m_pDlgNotes != NULL) // 注释
{
strText = pDlg->m_pDlgNotes->GetText();
pExpresie->SetNotes(strText);
}
if( pDlg->m_pDlgEidolon ) // 参数精灵
{
strText = pDlg->m_pDlgEidolon->GetText();
pExpresie->SetEidolon(strText);
}
if( m_pEstopPeriodDlg != NULL )
{
*pExpresie->GetEstopPeriod() = m_pEstopPeriodDlg->GetEstopPeriod(); // 禁用周期
*pExpresie->GetDefaultPeriod() = m_pEstopPeriodDlg->GetDefaultPeriod(); // 缺省周期
}
// 更新树
if( pDlg->m_pFormulaMan != NULL )
{
pHxTreeCtrl = pDlg->m_pFormulaMan->GetCurTree((WORD)pDlg->m_nExpressType);
if(pHxTreeCtrl != NULL)
{
//pExpresie->SetExpressType(pHxTreeCtrl->GetType());
if(pValoare != NULL)
{
//pHxTreeCtrl->UpdateTreeItemData(pValoare,pValue);
}
else
{
if(pDlg != NULL)
{
pDlg->SetTitle(pExpresie->GetExpressType(),strName);
}
pHxTreeCtrl->AddItem(strName,pValue,m_pExternExpression);
if( pDlg->IsType(CDlgFormulaEdit::NewExp) )
{
pDlg->m_strOldName = strName;
pExpresie->AddStyle(HS_EXP_USEREDIT);
pDlg->SetType(CDlgFormulaEdit::Update | pDlg->IsType(CDlgFormulaEdit::SpeedNew));
}
}
}
}
// 更新绘图窗口
ExpPropery NameProp;
NameProp.m_dExpType = pExpresie->GetExpressType();
NameProp.m_strName.Format("%s", pExpresie->GetName());
NameProp.m_strDescribe.Format("%s", pExpresie->GetDescribe());
NameProp.m_bStyle = pExpresie->GetStyle();
if ( g_pFormulaMan )
g_pFormulaMan->SendLinkMsg(DiagramMsg_FormulaParamChanged,(LPARAM)&NameProp);
if(pPromptWnd != NULL)
{
pPromptWnd->SendMessage(HX_USER_COMPILE_INFO,0,0);
//pPromptWnd->SetWindowText(strErroText);
}
m_pParentDlg->ShowResult(CDlgFormulaEdit::CompileResult);
::SendMessage(g_hParentWnd,g_SendReLoadTabItemMsg,0,0); //qinhn 20090721 Add 重新载入T指标ab页,防止点修改公式对话框里面的"保存"后出错
return (long)pExpresie;
}
else
{
/*strErroText = "公式有几个错误!";
if(pBtError != NULL)
{
pBtError->EnableWindow(TRUE);
}
if(pPromptWnd != NULL)
{
pPromptWnd->SetWindowText(strErroText);
}*/
//AddCompileInfotoList(11,(LPARAM)&info);
m_pParentDlg->ShowResult(CDlgFormulaEdit::CompileResult);
delete pExpresie;
}
return 0;
}