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

CXTPControlPopup dynamic menu items

 Post Reply Post Reply
Author
Message
skura View Drop Down
Newbie
Newbie


Joined: 11 January 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote skura Quote  Post ReplyReply Direct Link To This Post Topic: CXTPControlPopup dynamic menu items
    Posted: 02 February 2005 at 10:58am

I am using a CXTPControlPopup (xtpControlSplitButtonPopup) in a toolbar. I would like to dynamically create the menu when the user clicks on the down arrow. How can I achieve this?

Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2005 at 11:30am

See:   void CMainFrame::OnInitCommandsPopup(CXTPPopupBar* pCommandBar)
Back to Top
skura View Drop Down
Newbie
Newbie


Joined: 11 January 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote skura Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2005 at 6:22pm

Ark42,

Thanks for the help. Now I could populate the menu dynamically.

I am running into following issue. The functions defined by the following message map entries are getting only when the user clicks on the "label" associated with the SplitButtonPopup. They are not getting called if the user clicks on the "arrow".

 ON_UPDATE_COMMAND_UI(IDC_WIFIDROPBUTTON, OnPopulateList)
 ON_XTP_EXECUTE(IDC_WIFIDROPBUTTON, OnSelectListEntry)

Is this the expected behavior OR is this Toolkit bug? How can I overcome this issue?

Thanks in advance.

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: 03 February 2005 at 9:34am
it is designed behaviour.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
skura View Drop Down
Newbie
Newbie


Joined: 11 January 2005
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote skura Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2005 at 2:41pm

Oleg,

Thanks for your response.

I ended up over loading the OnControlSelected() by defining the following message map entry.

 ON_MESSAGE(WM_XTP_CONTROLSELECTED, OnControlSelected)

Any potential problems with this approach?



Edited by skura
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: 04 February 2005 at 5:13am

Better way is WM_XTP_INITCOMMANDSPOPUP.

 

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.059 seconds.