mspocketpc.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Smartphone soft key menu without resource file?

 
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Developers
Author Message
Rick C



Joined: 06 Feb 2008
Posts: 12

PostPosted: Wed Feb 27, 2008 9:25 pm    Post subject: Smartphone soft key menu without resource file? Reply with quote

I was trying to make a little C++ program that would create a soft key-based
menu (this is trivial, of course, in .Net, MS has decided in its infinite
wisdom not to support C++ in .Net CF) and it seems like SHCreateMenuBar will
return success but not do anything if you try to use an HMENU instead of a
resource from a resource file. The only info I've seen about this after a
web search was a post from 2004 saying that the documentation is lacking in
that it doesn't say this isn't supported. Is this still the case, even on
WM6?

Perhaps because I've got a slight Luddite streak I want to do some
development with the commandline tools instead of using Visual Studio per
se. The Windows Mobile 6 SDK add-on for Visual Studio doesnt' seem to have
a version of rc.exe--will the regular version work to create .res files?

Archived from group: microsoft>public>smartphone>developer
Back to top
View user's profile Send private message
Christopher Fairbairn



Joined: 30 Oct 2007
Posts: 57

PostPosted: Thu Feb 28, 2008 5:42 pm    Post subject: Re: Smartphone soft key menu without resource file? Reply with quote

Hi,

"Rick C" wrote in message $YeIHA.1824@TK2MSFTNGP02.phx.gbl...
>I was trying to make a little C++ program that would create a soft
>key-based menu and it seems like SHCreateMenuBar will return success but
>not do
> anything if you try to use an HMENU instead of a resource from a resource
> file.

Take a look at the Channel 9 Windows Mobile developer wiki. In particular
the "Creating and Using menus on Windows Mobile 5.0 Pocket PCs" entry
available at
http://channel9.msdn.com/wiki/default.aspx/MobileDeveloper.Menu, it might
provide some background information that might get you started.

For backwards compatability reasons (i.e. maximum platform support) I
generally place a "dummy" menu resource with two soft key buttons in my
resource file. Then using techniques similiar to the ones discussed in the
wiki article I can replace the menu content (popup menus, labels, command
ids etc) at runtime after it's been created from the resource file.

Yes the desktop rc.exe should work fine from the command line for Windows CE
projects. The difference between the two environments is what include file
directories etc are used when compiling the *.rc source file.

Hope this helps,
Christopher Fairbairn

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Create a menu without resource Hi, How do I create a Menu in SHMenuBar without use rc files in WM5 ? I need create menu in run-time. Thanks

Windows Mobile 5.0 Soft Keys Menu I've attached normal menus to use with the soft keys on my device (using and a menu resource), but am having trouble finding information on how to use two buttons for the left and right softkeys (displays at bottom of screen). Can someon

Extending File Explorer "Menu" Menu I have written a program for Windows Mobile 5/6 that can operate on files. To access the functionality I have extended the file context menu by implementing IContextMenu. This allows the user to tap and hold on a file and activate my code. However, not al

How to Embaded a File in the Solution as an Embaded Resource Hi, On smartphone programing, it's easy when embaded a picture into the solution as an Embaded Resource. But, how to embaded a file (especially mp3 file) ?? and to use it like using picture file??

Giving PPC Menu a Smartphone Menus functionality Hi, The default menu on a Smartphone prefixes each menu option with a number. Enter that number on the keypad and that menu item is selected. I would like to implement this same functionality on a PPC. Is there a quick and easy way of makin
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group