Adding menu items at runtime - PocketPC

Posted on 2005-05-09
Medium Priority
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

jkr earned 2000 total points
ID: 13960706
According to http://msdn.microsoft.com/library/en-us/wceui/html/_wcesdk_Using_Menu_Creation_Functions.asp ("CE 3.0 - Using Menu Creation Functions") and http://msdn.microsoft.com/library/en-us/wceui40/html/cerefUsingMenuCreationFunctions.asp ("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.

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

850 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