Fixes for bug #122733 and #123245. Both reviewed by blythe.

git-svn-id: svn://10.0.0.236/trunk@3949 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt
1998-06-16 23:10:17 +00:00
parent e882b3963e
commit b3d49f6d20
3 changed files with 15 additions and 1 deletions

View File

@@ -341,6 +341,11 @@ BOOL CSelectorButton::CreateRightMouseMenu()
// Build the actual menu.
m_MenuCommandMap.Clear();
// Set the selected view, but do a mask if we're closed so we don't end up opening the pane.
HT_SetSelectedView(HT_GetPane(m_HTView), m_HTView);
HT_SetSelection(HT_TopNode(m_HTView));
HT_Cursor theCursor = HT_NewContextualMenuCursor(m_HTView, PR_TRUE, PR_FALSE);
if (theCursor != NULL)
{
@@ -361,8 +366,15 @@ BOOL CSelectorButton::CreateRightMouseMenu()
}
HT_DeleteCursor(theCursor);
}
return TRUE;
}
void CSelectorButton::DisplayAndTrackMenu()
{
CRDFToolbarButton::DisplayAndTrackMenu();
}
/////////////////////////////////////////////////////////////////////////////
// CNavCenterFrame

View File

@@ -96,6 +96,8 @@ public:
virtual BOOL UseLargeIcons() { return TRUE; }
virtual void DisplayAndTrackMenu(void);
virtual void OnAction(void);
int Create(CWnd *pParent, int nToolbarStyle, CSize noviceButtonSize, CSize advancedButtonSize,

View File

@@ -3759,7 +3759,7 @@ extern "C" MWContext* FE_GetRDFContext(void)
// The context's GetDialogOwner() function.
CWnd* CRDFCX::GetDialogOwner() const
{
if (m_pCurrentRDFWindow == NULL)
if (m_pCurrentRDFWindow == NULL || m_pCurrentRDFWindow->m_hWnd == NULL)
return CWnd::GetDesktopWindow();
return m_pCurrentRDFWindow->GetTopLevelFrame();
}