本文整理汇总了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);
}
示例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;
//.........这里部分代码省略.........