Control execution context |
Post Reply |
Author | |
No.Regsz
Groupie Joined: 28 December 2008 Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 15 April 2011 at 7:21pm |
I have a popup menu for a toolbar button. Similar to Office color picker.
I'd like to reuse the same popup for a split button inside a docking view. I use the following method and have command handlers in both the document child view and the docking view content dialog: void CMainFrame::TrackBookmarkPopup(int xPos, int yPos, CWnd *pWnd /*= NULL*/) { CXTPCommandBars::TrackPopupMenu(m_pBookmarkPopup, TPM_LEFTBUTTON, xPos, yPos, pWnd, NULL, pWnd); }
When I use this method once - all commands start to dispatch through a passed docking view child dialog. Even if I open this popup from the toolbar with a docking view closed. Am I doing it wrong way? Popup bar has changed commands target forever?
|
|
XTP 15.0.1
7 SP1 VS 2010 SP1 Beta |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Yes, actually its true. After TrackPopupMenu, pWnd will be set to m_pBookmarkPopup Maybe solution is call with first pWnd = NULL and then reset owner m_pBookmarkPopup->SetOwner(NULL); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |