Which menu item has been selected? |
Post Reply |
Author | |
simus
Groupie Joined: 08 July 2005 Status: Offline Points: 43 |
Post Options
Thanks(0)
Posted: 12 December 2005 at 2:47am |
Hi, I have a standard CXTPCommandBars. I wanted to handle the "lifetime" of a CXTPCommandBar when it is shown (TrackPopupMenu and MainFrame menu) and the selected item in the command bar if any. I would like to do this to automatize the autohide of rarely used items in menus. So I handled : Then I handled WM_COMMAND in the MainFrame to catch what command has been selected The problem I have is that the WM_COMMAND is fired after ON_XTP_UNINITCOMMANDSPOPUP() and I "need" to get it before ON_XTP_UNINITCOMMANDSPOPUP() or at least know before ON_XTP_UNINITCOMMANDSPOPUP() what is the selected item in the menu. Or any other help is welcome. Thanks a lot
So before the CXTPCommandBar is shown I have ON_XTP_INITCOMMANDSPOPUP(), After the |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi As workaround in UNINITCOMMANDSPOPUP you can check all controls of PopupBar and check if pControl->GetPressed() for (....; i < pPopupBar->GetControls()->GetCount()..) { if (pPopupBar->GetControl(i)->GetPressed()) ...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
simus
Groupie Joined: 08 July 2005 Status: Offline Points: 43 |
Post Options
Thanks(0)
|
Thanks
|
|
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 |