当前位置: 首页>>代码示例>>C++>>正文


C++ CBCGPGridRow::GetRect方法代码示例

本文整理汇总了C++中CBCGPGridRow::GetRect方法的典型用法代码示例。如果您正苦于以下问题:C++ CBCGPGridRow::GetRect方法的具体用法?C++ CBCGPGridRow::GetRect怎么用?C++ CBCGPGridRow::GetRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBCGPGridRow的用法示例。


在下文中一共展示了CBCGPGridRow::GetRect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnContextMenu

void CMailView::OnContextMenu(CWnd*, CPoint point)
{
	if (point == CPoint (-1, -1))
	{
		CBCGPGridRow* pSel = GetReportCtrl ()->GetCurSel ();
		if (pSel != NULL)
		{
			CRect rect = pSel->GetRect ();
			ClientToScreen (&rect);

			point.x = rect.left;
			point.y = rect.bottom;
		}
	}

	theApp.ShowPopupMenu (IDR_MAIL_MENU, point, this);
}
开发者ID:zxlooong,项目名称:bcgexp,代码行数:17,代码来源:MailView.cpp

示例2: OnShowTreeContextMenu

//************************************************************************************************
void CBCGPRibbonCustomizeRibbonPage::OnShowTreeContextMenu(CBCGPRibbonTreeCtrl* pTreeCtrl, CPoint point)
{
	if (pTreeCtrl != &m_wndRibbonTreeDest)
	{
		return;
	}

	if (m_pSelCategoryDest == NULL && m_pSelPanelDest == NULL && m_pSelElemDest == NULL)
	{
		return;
	}

	const UINT idNewTab		= (UINT) -102;
	const UINT idNewGroup	= (UINT) -103;
	const UINT idRename		= (UINT) -104;
	const UINT idRemove		= (UINT) -105;
	const UINT idMoveUp		= (UINT) -106;
	const UINT idMoveDown	= (UINT) -107;

	CMenu menu;
	menu.CreatePopupMenu ();

	{
		CBCGPLocalResource locaRes;
		CString strItem;

		m_wndNewTab.GetWindowText(strItem);
		menu.AppendMenu(MF_STRING, idNewTab, strItem);

		if (!m_wndNewTab.IsWindowEnabled())
		{
			menu.EnableMenuItem(idNewTab, MF_GRAYED);
		}

		m_wndNewGroup.GetWindowText(strItem);
		menu.AppendMenu(MF_STRING, idNewGroup, strItem);

		if (!m_wndNewGroup.IsWindowEnabled())
		{
			menu.EnableMenuItem(idNewGroup, MF_GRAYED);
		}

		menu.AppendMenu (MF_SEPARATOR);

		m_wndRename.GetWindowText(strItem);
		menu.AppendMenu(MF_STRING, idRename, strItem);

		if (!m_wndRename.IsWindowEnabled())
		{
			menu.EnableMenuItem(idRename, MF_GRAYED);
		}
		
		strItem.LoadString(IDS_BCGBARRES_DELETE);
		menu.AppendMenu(MF_STRING, idRemove, strItem);
		
		if (!m_wndRemove.IsWindowEnabled())
		{
			menu.EnableMenuItem(idRemove, MF_GRAYED);
		}

		menu.AppendMenu (MF_SEPARATOR);

		strItem.LoadString(IDS_BCGBARRES_MOVEUP);
		menu.AppendMenu(MF_STRING, idMoveUp, strItem);

		if (!m_wndUp.IsWindowEnabled())
		{
			menu.EnableMenuItem(idMoveUp, MF_GRAYED);
		}

		strItem.LoadString(IDS_BCGBARRES_MOVEDN);
		menu.AppendMenu(MF_STRING, idMoveDown, strItem);

		if (!m_wndDown.IsWindowEnabled())
		{
			menu.EnableMenuItem(idMoveDown, MF_GRAYED);
		}
	}

	HWND hwndThis = GetSafeHwnd ();

	CPoint pt = point;
	if (pt == CPoint(-1, -1))
	{
		CBCGPGridRow* pRow = pTreeCtrl->GetCurSel();
		if (pRow != NULL)
		{
			CRect rectRow = pRow->GetRect();
			pt  = CPoint(rectRow.left, rectRow.bottom + 1);
		}
		else
		{
			pt = CPoint (0, 0);
		}
	}

	pTreeCtrl->ClientToScreen(&pt);

	int nMenuResult = 0;
//.........这里部分代码省略.........
开发者ID:iclosure,项目名称:jframework,代码行数:101,代码来源:BCGPRibbonCustomizePage.cpp


注:本文中的CBCGPGridRow::GetRect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。