| | | | Browse by category |
Article ID: 708
Last updated: 11 Jun, 2018
Problem
How can I display a dialog or popup-menu when the user clicks the right mouse button?
Cause
Action
You should override the OnRButtonClickedRowCol() method and call TrackPopupMenu().
Example:
BOOL CMyGridCtrl::OnRButtonClickedRowCol(ROWCOL nRow, ROWCOL nCol, UINT nFlags, CPoint pt) { |
||
// unreferenced parameters nRow, nCol, nFlags; CMenu menu; CMenu* pPopup = menu.GetSubMenu( 0 ); CWnd* pWndPopupOwner = AfxGetMainWnd( ); // display the menu // we processed the message |
||
} |
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 708
Last updated: 11 Jun, 2018
Revision: 3
Views: 1763
Posted: 23 Jan, 2001 by
Meltreger B.
Updated: 11 Jun, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)