diff --git a/PInvoke/Shell32/ShellApi.cs b/PInvoke/Shell32/ShellApi.cs index 0d34b17d..6cc834c8 100644 --- a/PInvoke/Shell32/ShellApi.cs +++ b/PInvoke/Shell32/ShellApi.cs @@ -14,6 +14,9 @@ namespace Vanara.PInvoke /// Interfaces, functions, enumerated types and structures for Shell32.dll. public static partial class Shell32 { + /// + public const int NINF_KEY = 0x1; + /// Values used in APPBARDATA. [PInvokeData("shellapi.h", MSDNShortId = "cf86fe15-4beb-49b7-b73e-2ad61cedc3f8")] public enum ABE @@ -313,6 +316,48 @@ namespace Vanara.PInvoke NIM_SETVERSION = 0x00000004, } + /// Shell notification messages delivered as a result of calling . + [PInvokeData("shellapi.h")] + public enum NIN + { + /// Sent when a user selects a notify icon with the mouse and activates it with the ENTER key + NIN_SELECT = User32.WindowMessage.WM_USER + 0, + + /// + /// Sent when a user selects a notify icon with the keyboard and activates it with the SPACEBAR or ENTER key, the version 5.0 + /// Shell sends the associated application an NIN_KEYSELECT notification. Earlier versions send WM_RBUTTONDOWN and WM_RBUTTONUP messages. + /// + NIN_KEYSELECT = NIN_SELECT | NINF_KEY, + + /// Sent when the balloon is shown (balloons are queued). + NIN_BALLOONSHOW = User32.WindowMessage.WM_USER + 2, + + /// + /// Sent when the balloon disappears. For example, when the icon is deleted. This message is not sent if the balloon is + /// dismissed because of a timeout or if the user clicks the mouse. + /// + /// As of Windows 7, NIN_BALLOONHIDE is also sent when a notification with the NIIF_RESPECT_QUIET_TIME flag set attempts to + /// display during quiet time (a user's first hour on a new computer). In that case, the balloon is never displayed at all. + /// + /// + NIN_BALLOONHIDE = User32.WindowMessage.WM_USER + 3, + + /// Sent when the balloon is dismissed because of a timeout. + NIN_BALLOONTIMEOUT = User32.WindowMessage.WM_USER + 4, + + /// Sent when the balloon is dismissed because the user clicked the mouse. + NIN_BALLOONUSERCLICK = User32.WindowMessage.WM_USER + 5, + + /// + /// Sent when the user hovers the cursor over an icon to indicate that the richer pop-up UI should be used in place of a + /// standard textual tooltip. + /// + NIN_POPUPOPEN = User32.WindowMessage.WM_USER + 6, + + /// Sent when a cursor no longer hovers over an icon to indicate that the rich pop-up UI should be closed. + NIN_POPUPCLOSE = User32.WindowMessage.WM_USER + 7, + } + /// State flags for NOTIFYICONDATA. [PInvokeData("shellapi.h", MSDNShortId = "fdcc42c1-b3e5-4b04-8d79-7b6c29699d53")] [Flags]