Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. How to remove the 'New' menu item from my PocketPC app?

How to remove the 'New' menu item from my PocketPC app?

Scheduled Pinned Locked Moved Mobile
c++helptutorialquestionlearning
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prcarp
    wrote on last edited by
    #1

    I know I am missing a simple setting somewhere but I can't find it. Google was unfortunately no help either. I am developing an MFC app (for now) and it has a menu resource. The menu appears how I want it but when deployed on the PocketPC 2003 (emulator or actual device), the 'New' menu option appears but it is disabled. How do 1) I remove it altogether or 2) take advantage of it? Thanks, Paul

    P 1 Reply Last reply
    0
    • P prcarp

      I know I am missing a simple setting somewhere but I can't find it. Google was unfortunately no help either. I am developing an MFC app (for now) and it has a menu resource. The menu appears how I want it but when deployed on the PocketPC 2003 (emulator or actual device), the 'New' menu option appears but it is disabled. How do 1) I remove it altogether or 2) take advantage of it? Thanks, Paul

      P Offline
      P Offline
      prcarp
      wrote on last edited by
      #2

      I found an answer and so I am posting the result here in case anyone else wants to do this.... First, this article was a big help: http://channel9.msdn.com/wiki/default.aspx/MobileDeveloper.Menu[^] So what I did was remove all instances of the CCommandBar (m_wndCommandBar) from the CMainFrame class that VS2005 automatically put in. In the CMainFrame::OnCreate() method, after the m_wndView.Init(), I added: SHMENUBARINFO mbi; memset(&mbi, 0, sizeof(SHMENUBARINFO)); mbi.cbSize = sizeof(SHMENUBARINFO); mbi.dwFlags = SHCMBF_HMENU; mbi.hwndParent = m_hWnd; mbi.nToolBarId = IDR_MAINFRAME; mbi.hInstRes = theApp.m_hInstance; SHCreateMenuBar(&mbi); This had the added benefit of allowing me to rename the main menu item (popup) as well. I am not sure of all the ramifications (portability, button access, etc.) but it seems to work fine for my PocketPC use.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups