All,
How do I add a menu to my app for a smart phone? It is a dialog app. When I
run it it has Ok at the bottom. I and menu option beside OK using the
resource view. But when I run my app I do not see what I added. Thanks in
advance.
Christopher Fairbairn [MVP] - 08 Jul 2008 05:02 GMT
Hi,
> How do I add a menu to my app for a smart phone? It is a dialog app.
I assume you have created a menu resource within your *.rc resource file.
Within your WM_INITDIALOG message handler you will need to call a function
such as SHCreateMenubar
(http://msdn.microsoft.com/en-us/library/aa453678.aspx) to create the
menubar and associate it with your dialog instance. Exactly how you will do
this will depend upon which GUI framework (MFC etc) you are utilising.
Take a look at the Menu page on the Channel 9 Windows Mobile developer
wiki - http://channel9.msdn.com/wiki/MobileDeveloper/Menu/ for further
details (in particular the "Creating the menu" section).
Hope this helps,
Christopher Fairbairn