Print Page | Close Window

Menu gets disabled in Ribbonbar...

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11304
Printed Date: 01 March 2025 at 12:26am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Menu gets disabled in Ribbonbar...
Posted By: Pariksh*t
Subject: Menu gets disabled in Ribbonbar...
Date Posted: 04 July 2008 at 1:00am
hello,
this is Pariksh*t.
 
i am implementing ribbonbar
i have one button and and one menu in ribbons group
when i click on button my menu gets disabled
what is the reason and what i am supposed to do?
 
The code snippet is given below for reference -
 

//'/Button 'Photo'.

CXTPControlButton* pCollectionPhoto = (CXTPControlButton*)pGroup->Add(xtpControlButton, IDC_PHOTO);

pCollectionPhoto->SetWidth(125);

pCollectionPhoto->SetStyle(xtpButtonIcon);

UINT uiGroupClipboardphoto[] = {IDC_PHOTO};

pCommandBars->GetImageManager()->SetIcons(IDR_SMALLICONS, uiGroupClipboardphoto, _countof(uiGroupClipboardphoto), CSize(16, 16));

//'/Button 'Photo' end.

//'/Mneu For Photo Button (Collection).

CXTPControlButton* p = (CXTPControlButton*)pGroup->Add(xtpControlPopup, IDR_MENU2);

CXTPControlPopup* pControlPhotoMenu = (CXTPControlPopup*)pRibbonBar->GetControls()->Add(xtpControlPopup, -1);

CMenu mnuPhotoCollection;

mnuPhotoCollection.LoadMenu(IDR_MENU2);

pControlPhotoMenu->SetCommandBar(mnuPhotoCollection.GetSubMenu(0));

pControlPhotoMenu->SetCaption(_T("Foto Finish"));

//'/Mneu For Photo Button (Collection) end.

 
Regards,
Pariksh*t.



Replies:
Posted By: Oleg
Date Posted: 04 July 2008 at 1:25am
Hi,
 
You need add ON_COMMAND handler for menu items.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Pariksh*t
Date Posted: 04 July 2008 at 2:56am

hello oleg

i have done event handling

 

http://192.168.40.16/pxlsoft/download/products/Testing/Temp/dfs.zip - http://192.168.40.16/pxlsoft/download/products/Testing/Temp/dfs.zip

 

http://192.168.40.16/pxlsoft/download/products/Testing/email.zip - http://192.168.40.16/pxlsoft/download/products/Testing/email.zip

These is my code

plz Reply
Bye



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net