Hi,
I have created MFC dialog based application for Pocket PC.
I have created the command bar.
//create the bottom menu
SHMENUBARINFO mbi = { 0 };
mbi.cbSize = sizeof( mbi );
mbi.hwndParent = this->m_hWnd;
mbi.dwFlags = SHCMBF_HMENU | SHCMBF_HIDESIPBUTTON;
mbi.nToolBarId = IDR_MAINSCREEN_MENU;
mbi.hInstRes = AfxGetInstanceHandle();
mbi.hwndMB = NULL; // This gets set by SHCreateMenuBar
::SHCreateMenuBar( &mbi );
m_CommandBar.m_hCommandBar = mbi.hwndMB;
m_CommandBar.SubclassWindow( mbi.hwndMB );
The command bar is having three menu items like
1.Back
2.Help
3.Settings
I have set the "Settings" menu item's property as grayed.
But the menu item is not grayed out. It is still functional. Even I
have tried the "Enabled" property set to "false" also. Then also the
same output.
If the command bar has two menu items, then I am able to disable the
menu item using Grayed property set to "true".
I don't want to delete the menu item.
Please let me know, is there any solution to disable the menu item
when the command bar has three or more than two menu items.
Thanks in advance.
Regards,