Click here to Skip to main content
15,901,035 members
Home / Discussions / Mobile
   

Mobile

 
GeneralDetecting directional button Pin
dherrero19-Mar-03 4:11
dherrero19-Mar-03 4:11 
GeneralRe: Detecting directional button Pin
João Paulo Figueira19-Mar-03 4:59
professionalJoão Paulo Figueira19-Mar-03 4:59 
GeneralRe: Detecting directional button Pin
dherrero19-Mar-03 5:30
dherrero19-Mar-03 5:30 
GeneralRe: Detecting directional button Pin
Frank S.20-Mar-03 23:19
Frank S.20-Mar-03 23:19 
GeneralProgramming for Symbian OS Pin
Andy H19-Mar-03 1:03
Andy H19-Mar-03 1:03 
GeneralRe: Programming for Symbian OS Pin
Junkie24-Mar-03 21:27
Junkie24-Mar-03 21:27 
GeneralCreating a user mode process from kernel mode driver Pin
shivpal18-Mar-03 4:06
shivpal18-Mar-03 4:06 
GeneralMenus Pin
#realJSOP18-Mar-03 2:26
professional#realJSOP18-Mar-03 2:26 
I want to disable all of the items in commandbar, but it doesn't seem to be working. Here's what I'm doing:

// make sure we have or can get a pointer to the menu
if (m_menuBarPtr)
{
    m_menuBarPtr = GetMenu();
}
// if we have a pointer to the menu, we can disable everything (theoretically)
if (m_menuBarPtr)
{
    MessageBeep(0);
    // Since these are all top-level menu items, they don't have ID's, so we
    // have to disable according to their relative positions in the menu.
    // Further, the MF_DISABLED flag is not supported in CE, so all we
    // can/should do is gray out the menu item, and that should do the trick.
    UINT menuStyle = MF_BYPOSITION | ((m_currentBar == 0) ?  MF_ENABLED : MF_GRAYED);
    m_menuBarPtr->EnableMenuItem(0, menuStyle);
    m_menuBarPtr->EnableMenuItem(1, menuStyle);
    m_menuBarPtr->EnableMenuItem(2, menuStyle);
    m_menuBarPtr->EnableMenuItem(3, menuStyle);
}


I've also tried setting ther m_menuBarPtr by using the return value of the CCeCommandBar::InsertMenu() function.

If you'll notice the
MessageBeep(0);
call, I hear that beep when this code is encountered, indicating that I do indeed have a valid CMenu*, but the menu items are still active. According to the CE help, MF_DISABLED is not supported by CE (what an arbitrarily stupid f***ing decision on Microsoft's part), so I can't use it (although I did try it just to make sure, and of course, my app wouldn't compile with it included in the code).

Why does the interface stuff in CE suck so bad? Why is the documentation a complete waste of a CD? Why hasn't there been a decent book written for PPC2K2 development?

BTW, I also added this line in the constructor to CMainFrame

m_bAutoMenuEnable = FALSE;


Confused | :confused:

------- signature starts

"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

Please review the Legal Disclaimer in my bio.

------- signature ends
GeneralRe: Menus Pin
João Paulo Figueira18-Mar-03 4:27
professionalJoão Paulo Figueira18-Mar-03 4:27 
GeneralRe: Menus Pin
#realJSOP18-Mar-03 5:16
professional#realJSOP18-Mar-03 5:16 
GeneralRe: Menus Pin
João Paulo Figueira18-Mar-03 5:45
professionalJoão Paulo Figueira18-Mar-03 5:45 
GeneralRe: Menus Pin
#realJSOP18-Mar-03 6:13
professional#realJSOP18-Mar-03 6:13 
GeneralRe: Menus Pin
João Paulo Figueira18-Mar-03 6:19
professionalJoão Paulo Figueira18-Mar-03 6:19 
GeneralRe: Menus Pin
#realJSOP18-Mar-03 7:01
professional#realJSOP18-Mar-03 7:01 
GeneralRe: Menus Pin
João Paulo Figueira18-Mar-03 11:14
professionalJoão Paulo Figueira18-Mar-03 11:14 
GeneralRe: Menus Pin
#realJSOP19-Mar-03 0:00
professional#realJSOP19-Mar-03 0:00 
GeneralRe: Menus Pin
#realJSOP19-Mar-03 4:03
professional#realJSOP19-Mar-03 4:03 
GeneralRe: Menus Pin
Amit Dey31-Mar-03 12:31
Amit Dey31-Mar-03 12:31 
GeneralRe: Menus Pin
João Paulo Figueira31-Mar-03 21:17
professionalJoão Paulo Figueira31-Mar-03 21:17 
GeneralRe: Menus Pin
#realJSOP19-Mar-03 4:06
professional#realJSOP19-Mar-03 4:06 
GeneralRe: Menus Pin
João Paulo Figueira19-Mar-03 4:58
professionalJoão Paulo Figueira19-Mar-03 4:58 
GeneralRe: Menus Pin
#realJSOP19-Mar-03 5:15
professional#realJSOP19-Mar-03 5:15 
GeneralRe: Menus Pin
João Paulo Figueira19-Mar-03 5:46
professionalJoão Paulo Figueira19-Mar-03 5:46 
GeneralRe: Menus Pin
#realJSOP19-Mar-03 6:12
professional#realJSOP19-Mar-03 6:12 
GeneralRe: Menus Pin
João Paulo Figueira19-Mar-03 23:54
professionalJoão Paulo Figueira19-Mar-03 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.