![]() |
ContextMenu |
Post Reply
|
| Author | |
Jose Vicente
Newbie
Joined: 02 June 2005 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: ContextMenuPosted: 10 June 2005 at 4:55am |
|
Hello.
I want to display contextual menus with Office 2003, so I want to use codejock for it. But I don't know which classes I have to use. I have looked to the CXTPPopupBar but this class requires in order to be used to have a menu bar, which is something I don't have in my ActiveX. Someone can help me ?? Best Regards. |
|
![]() |
|
Jose Vicente
Newbie
Joined: 02 June 2005 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 June 2005 at 5:26am |
|
I have tried this but a unhandled exception is fired.
I guess that the exception is fired because I don't have command bars. CXTPCommandBars::TrackPopupMenu( Menu.GetSubMenu(0), TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd () ); |
|
![]() |
|
bevpet
Newbie
Joined: 01 April 2005 Location: Canada Status: Offline Points: 39 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 June 2005 at 5:06pm |
|
Hi try this: CMenu* pPopup, menu; VERIFY(menu.LoadMenu(IDR_YOUR_MENU_ID_HERE)); pPopup = menu.GetSubMenu(0); CXTPCommandBars::TrackPopupMenu(pPopup, 0, point.x, point.y, this); |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 June 2005 at 8:56am |
|
If you don't use CommandBars, You must init PaintManager: CXTPPaintManager::SetTheme(xtpThemeOfficeXP); |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Jose Vicente
Newbie
Joined: 02 June 2005 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 June 2005 at 12:34am |
|
Thanks to both. Now it works perfect.
|
|
![]() |
|
jigarmehtamscit
Groupie
Joined: 29 October 2005 Location: India Status: Offline Points: 64 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 March 2006 at 2:58pm |
|
Hi, So, what do you mean ? Actually i could not get you properly.. I have a dialog based application and have a CMenu object ready with me which i am showing into popup using following code.. if (!menu.TrackPopupMenu (TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, ScreenPoint.x, ScreenPoint.y, m_pwmdMenuTrack, NULL)) So, what will I need to do if I want to show 2003 style CJ popup menu ? Please help me..
|
|
|
Regards,
Jigar Mehta |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 March 2006 at 7:37am |
|
Hello, you must show it with CXTPCommandBars::TrackPopupMenu(&menu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, ScreenPoint.x, ScreenPoint.y, this); |
|
|
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 |