Connecting Tech Pros Worldwide Forums | Help | Site Map

How to Create Notification with Menu for Windows Mobile 6 using C# .Net CF 2.0

Newbie
 
Join Date: May 2009
Posts: 4
#1: May 30 '09
Hello Friends,

By default Notification control present in .Net CF 2.0 for Windows Mobile 6.0 does not provide Menu support. So I am tryingto implement the menu feature for Notification using C#. So, I tried to port this structure SHNOTIFICATIONDATA in C#. This structure has a nested structure called SOFTKEYMENU which looks as follows,

typedef struct _SOFTKEYMENU {
HMENU hMenu;
SOFTKEYCMD *prgskc;
UINT cskc;
} SOFTKEYMENU;Members

I have ported the SOFTKEYMENU structure in C# as follows,

[StructLayout(LayoutKind.Sequential)]
struct SOFTKEYMENU
{
public IntPtr hMenu;
public IntPtr[] skc; //SOFTKEYCMD
public uint cskc;
}

What should I pass in the hMenu parameter. If its the handle of MainMenu control. How to get the handle of MainMenu control in C# .Net CF 2.0?

Newbie
 
Join Date: May 2009
Posts: 4
#2: Jun 1 '09

re: How to Create Notification with Menu for Windows Mobile 6 using C# .Net CF 2.0


Hi Friends,
Is it Possible?
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#3: Jun 3 '09

re: How to Create Notification with Menu for Windows Mobile 6 using C# .Net CF 2.0


Couldn't you just create your own form?
Newbie
 
Join Date: May 2009
Posts: 4
#4: Jun 3 '09

re: How to Create Notification with Menu for Windows Mobile 6 using C# .Net CF 2.0


Hi Friends,

I got the answer. No need to get MainMenu control handle. We can fill the hMenu parameter by creating our own Menu using "CreateMenu", "AppendMenu" API's.
Reply

Tags
notification with menu