Ejemplo n.º 1
0
    /// <summary>
    /// Initializes a new instance of the <see cref="Notification"/> class.
    /// </summary>
    /// <remarks>This class is not supported on the Smartphone or other Windows CE devices that are not Pocket PCs.
    /// You can create multiple notifications, such as an array of notifications, and display them as needed with the Visible property.</remarks>
    public NotificationWithSoftKeys()
    {
      m_data = new SHNOTIFICATIONDATA();

      if (PlatformSupportsCustomSoftKeyButtons)
        m_data.cbStruct = Marshal.SizeOf(m_data);
      else
        m_data.cbStruct = Marshal.SizeOf(m_data) - 32; // "hide" the 20 bytes that were added to this struct in WM5.0    
  
      m_data.clsid = clsid;
      m_data.dwID = id;
      m_data.hwndSink = msgwnd.Hwnd;
      m_data.csDuration = 10;

      notifications.Add(id, this);
     
      id++;
    }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Notification"/> class.
        /// </summary>
        /// <remarks>This class is not supported on the Smartphone or other Windows CE devices that are not Pocket PCs.
        /// You can create multiple notifications, such as an array of notifications, and display them as needed with the Visible property.</remarks>
        public NotificationWithSoftKeys()
        {
            m_data = new SHNOTIFICATIONDATA();

            if (PlatformSupportsCustomSoftKeyButtons)
            {
                m_data.cbStruct = Marshal.SizeOf(m_data);
            }
            else
            {
                m_data.cbStruct = Marshal.SizeOf(m_data) - 32; // "hide" the 20 bytes that were added to this struct in WM5.0
            }
            m_data.clsid      = clsid;
            m_data.dwID       = id;
            m_data.hwndSink   = msgwnd.Hwnd;
            m_data.csDuration = 10;

            notifications.Add(id, this);

            id++;
        }
Ejemplo n.º 3
0
 private static extern int SHNotificationGetData(ref Guid clsid, int dwID, ref SHNOTIFICATIONDATA shinfo);
Ejemplo n.º 4
0
 private static extern int SHNotificationUpdate(SHNUM grnumUpdateMask, ref SHNOTIFICATIONDATA shinfo);
Ejemplo n.º 5
0
 private static extern int SHNotificationAdd(ref SHNOTIFICATIONDATA shinfo);
Ejemplo n.º 6
0
 private static extern int SHNotificationGetData(ref Guid clsid, int dwID, ref SHNOTIFICATIONDATA shinfo);
Ejemplo n.º 7
0
 private static extern int SHNotificationUpdate(SHNUM grnumUpdateMask, ref SHNOTIFICATIONDATA shinfo);
Ejemplo n.º 8
0
 private static extern int SHNotificationAdd(ref SHNOTIFICATIONDATA shinfo);