![]() |
Context Menu |
Post Reply
|
| Author | |
dcolak
Newbie
Joined: 16 February 2005 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Topic: Context MenuPosted: 16 February 2005 at 5:32pm |
|
I've been trying to use Command Bars to create a context menu. This is the code I'm using in OnContextMenu:
CMenu menu; menu.LoadMenu( IDR_SQLBAR ); CMenu* pMenu = menu.GetSubMenu(0); CXTPPopupBar popup; popup.LoadMenu( pMenu ); popup.Popup( point.x, point.y, 0 ); Unfortunatelly, all this does is to flash the popup (it dissapears at once). Is there a sample for creating Context Menus? |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 February 2005 at 11:52pm |
|
ClientToScreen(&point);
CMenu mnu; mnu.LoadMenu(IDR_MAINFRAME); CXTPCommandBars::TrackPopupMenu(&mnu, TPM_RIGHTBUTTON , point.x, point.y, AfxGetMainWnd(), 0, 0);
|
|
|
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 |