Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - ContextMenu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ContextMenu

 Post Reply Post Reply
Author
Message
Jose Vicente View Drop Down
Newbie
Newbie


Joined: 02 June 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jose Vicente Quote  Post ReplyReply Direct Link To This Post Topic: ContextMenu
    Posted: 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.
Back to Top
Jose Vicente View Drop Down
Newbie
Newbie


Joined: 02 June 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jose Vicente Quote  Post ReplyReply Direct Link To This Post 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 () );


Back to Top
bevpet View Drop Down
Newbie
Newbie
Avatar

Joined: 01 April 2005
Location: Canada
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote bevpet Quote  Post ReplyReply Direct Link To This Post 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);

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Jose Vicente View Drop Down
Newbie
Newbie


Joined: 02 June 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jose Vicente Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2005 at 12:34am
Thanks to both. Now it works perfect.

Back to Top
jigarmehtamscit View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2005
Location: India
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote jigarmehtamscit Quote  Post ReplyReply Direct Link To This Post 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))
 {
  // delete the window now!!
  DestroyTrackWnd();
 }

So, what will I need to do if I want to show 2003 style CJ popup menu ? Please help me..

 

Originally posted by oleg oleg wrote:

If you don't use CommandBars, You must init PaintManager:

CXTPPaintManager::SetTheme(xtpThemeOfficeXP);

Regards,
Jigar Mehta
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.048 seconds.