Adding menu items at runtime - PocketPC

Posted on 2005-05-09
Last Modified: 2013-11-20
I am using eVC++ 4 and MFC.

I am trying to dynamically add popup menu items at runtime on a Pocket PC.  CreatePopup and AppendMenu don't seem to work like they do in Windows.  It looks like a menu is actually a series of toolbar buttons that act like menus.  I can append menu items to existing menus, but I can't seem to add my own.  How would I do this?  Thanks.

Timothy Dean
Question by:kevinbenedict
    1 Comment
    LVL 86

    Accepted Solution

    According to ("CE 3.0 - Using Menu Creation Functions") and ("CE .NET 4.2 - Using Menu Creation Functions") the following

    HMENU hmTrackPopup;    // The popup menu to track.

    // Create the popup menu.
    hmTrackPopup = CreatePopupMenu();

    // Append some items.
    AppendMenu(hmTrackPopup,MF_STRING, 1000,TEXT("Append Item 1"));
    AppendMenu(hmTrackPopup,MF_STRING, 1001, TEXT("Append Item 2"));

    should work.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    maxBlock challenge 30 88
    string initialization in java 11 94
    haveThree challenge 22 86
    tripleUp challenge 7 53
    Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
    Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now