本文整理汇总了C++中CValue::IsStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ CValue::IsStyle方法的具体用法?C++ CValue::IsStyle怎么用?C++ CValue::IsStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CValue
的用法示例。
在下文中一共展示了CValue::IsStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
//.........这里部分代码省略.........