本文整理汇总了C++中CBCGPGridRow::GetSubItemsCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPGridRow::GetSubItemsCount方法的具体用法?C++ CBCGPGridRow::GetSubItemsCount怎么用?C++ CBCGPGridRow::GetSubItemsCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBCGPGridRow
的用法示例。
在下文中一共展示了CBCGPGridRow::GetSubItemsCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PreTranslateMessage
BOOL CIfExpressEditorDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: 在此添加专用代码和/或调用基类
ASSERT(pMsg != NULL);
if (pMsg->message==WM_LBUTTONDOWN)
{
ZTools::WriteZToolsFormatLog("WM_LBUTTONDOWN");
if (m_wndTreeDropDown.IsWindowVisible())
{
m_wndTreeDropDown.ShowWindow(SW_HIDE);
ZTools::WriteZToolsFormatLog("鼠标点击隐藏树,失去焦点后");
return TRUE; // 本次点击只隐藏树
}
int iTickTime = GetTickCount();
int iGapTime = iTickTime - m_iTickCountTreeLeaveFocus;
if (CPoint(pMsg->pt) == m_PointTreeLeaveFocus && iGapTime < 100)
{
ZTools::WriteZToolsFormatLog("鼠标点击使得树失去焦点而隐藏,失去焦点前");
return TRUE; //屏蔽隐藏树前的点击事件
}
CRect rect;
bool bShowTree = FALSE;
CCxStructTreeNode *pNodeCur = NULL;
CString strArrID;
CString strTextArry;
if ( pMsg->hwnd == m_EditLeft.GetSafeHwnd())
{
bShowTree = TRUE;
m_EditLeft.GetWindowRect(&rect);
pNodeCur = m_pNodeLeft;
if (!m_Express.m_LeftParam.strArry.IsEmpty())
{
strArrID = m_Express.m_LeftParam.strID;
m_EditLeftArry.GetWindowText(strTextArry);
}
m_iFocusEidtPCtrlID = IDC_EDIT_LEFT;
}
else if (pMsg->hwnd == m_EditRight.GetSafeHwnd())
{
if (pMsg->hwnd == m_EditRight.GetSafeHwnd() && m_ComboRightType.GetCurSel()==TP_CONST)
bShowTree = FALSE;
else
{
bShowTree = TRUE;
m_EditRight.GetWindowRect(&rect);
pNodeCur = m_pNodeRight;
if (!m_Express.m_RightParam.strArry.IsEmpty())
{
strArrID = m_Express.m_RightParam.strID;
m_EditRightArry.GetWindowText(strTextArry);
}
}
m_iFocusEidtPCtrlID = IDC_EDIT_RIGHT;
}
if (bShowTree)
{
if (pNodeCur)
{
if (!strTextArry.IsEmpty())
{
CCxStructTreeNode *pDefaultSel = FindArryElementNode(strArrID,strTextArry);
if (pDefaultSel)
pNodeCur = pDefaultSel;
}
CBCGPGridRow* pSel = m_wndTreeDropDown.m_IfEditTree.FindRowByData((DWORD_PTR)pNodeCur);
m_wndTreeDropDown.m_IfEditTree.SetCurSel(pSel);
m_wndTreeDropDown.m_IfEditTree.UpdateSelToParamName(); //选中树的第一列
if (pSel)
{
ASSERT_VALID (pSel);
CBCGPGridRow* pParent = pSel;
while ((pParent = pParent->GetParent ())!= NULL &&pParent->GetSubItemsCount()>0)
{
ASSERT_VALID (pParent);
pParent->Expand (TRUE);
}
m_wndTreeDropDown.m_IfEditTree.EnsureVisible (pSel, TRUE); // 保证当前选中行可见
}
}
else
{
m_wndTreeDropDown.m_IfEditTree.SelectRow(-1);
m_wndTreeDropDown.m_IfEditTree.ExpandAll(FALSE);
}
m_wndTreeDropDown.SetWindowPos(&wndTopMost,rect.left,rect.bottom,0,0,SWP_NOSIZE|SWP_SHOWWINDOW);
m_wndTreeDropDown.m_IfEditTree.SetFocus();
return TRUE;
}
}
return CCxBCGPDialog::PreTranslateMessage(pMsg);
}