Print Page | Close Window

CustomComboList

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=5645
Printed Date: 23 June 2024 at 3:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CustomComboList
Posted By: iandenis
Subject: CustomComboList
Date Posted: 29 November 2006 at 5:27pm
Hello,
 
Is there anyway to use a custom popup like CXTPPopupToolBar in OnInplaceButtonDown?  Something like what is done for Property Grid Sample's CustomCombolist with CXTColorSelectorCtrl but I am looking for a popup tool bar instead.
 
Thx.
 
Ian



Replies:
Posted By: Oleg
Date Posted: 30 November 2006 at 2:17am
Why not... Override OnInplaceButtonDown and show popup with CXTPCommandBars::TrackPopupMenu

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: iandenis
Date Posted: 30 November 2006 at 7:19pm

Thank you.  That seems to be working out with single monitor.  I was trying to reuse an existing CXTPPopupToolBar originally tied with a dropdown button within a tab toolbar.  The pointer was exposed and past into TrackPopupMenu.  Everything seems to be fine until the CXTPPopupToolBar is called from the dropdown button.  The bar fails to display at the expected location when calling it again from the property grid floating in the second display.   The calculated Rect for TrackPopupMenu seems to be correct even when the bar is displayed at a wrong position.

Here is my code fragment.
void CCustomItemColor::OnInplaceButtonDown()
{
    CRect rcItem= GetItemRect();
    m_pGrid->ClientToScreen(&rcItem);
    rcItem.left = rcItem.right - 202;
    CXTPPopupToolBar* pPopup = ((CMainFrame*)AfxGetMainWnd())->m_pPopupBarFill;
    int nCommand = CXTPCommandBars::TrackPopupMenu(pPopup, TPM_RIGHTBUTTON|TPM_NONOTIFY|TPM_RETURNCMD, rcItem.left, rcItem.bottom, m_pGrid);
    .
    .
}



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net