![]() |
CXTPControlPopup dynamic menu items |
Post Reply
|
| Author | |
skura
Newbie
Joined: 11 January 2005 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPControlPopup dynamic menu itemsPosted: 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? |
|
![]() |
|
Ark42
Senior Member
Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 February 2005 at 11:30am |
|
See: void CMainFrame::OnInitCommandsPopup(CXTPPopupBar* pCommandBar) |
|
![]() |
|
skura
Newbie
Joined: 11 January 2005 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
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) Is this the expected behavior OR is this Toolkit bug? How can I overcome this issue? Thanks in advance. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 February 2005 at 9:34am |
|
it is designed behaviour.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
skura
Newbie
Joined: 11 January 2005 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 February 2005 at 5:13am |
|
Better way is WM_XTP_INITCOMMANDSPOPUP.
|
|
|
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 |