NMSHN
This structure contains a notification message and codes for window-based notification. The notification's dwID is in hdr.idFrom.
typedef struct _NMSHN {
NMHDR hdr;
LPARAM lParam;
DWORD dwReturn;
Union {
LPCTSTR pszLink;
BOOL fTimeout;
POINT pt;
};
} NMSHN;
Members
hdr
The standard notification message header. hdr.idFrom contains the notification's unique identifier (dwID); hdr.code is one of the following values.Value Description SHNN_LINKSEL pszLink contains the link text of the choice that was selected. SHNN_DISMISS fTimeout is TRUE if duration expired, FALSE if user tapped away. SHNN_SHOW pt contains the point to which the bubble points. SHNN_NAVLEFT Toast stack left spinner clicked, dpad left action. SHNN_NAVRIGHT Toast stack right spinner clicked, dpad right action. SHNN_VIEWITEM Toast dpad action. SHNN_INITMENU Indicates menu coming up, and that hMenu is in lParam. SHNN_ICONCLICKED pt contains the coordinates of the point where the user clicked. lParam
The lParam for the notification.dwReturn
A return value to pass back to the notification handler (SHNN_LINKSEL only).pszLink
Contains the link text of the choice that was selected (SHNN_LINKSEL only).fTimeout
Is TRUE if the notification's timeout duration expired; FALSE if the user dismissed the notification some other way, such as by tapping elsewhere (SHNN_DISMISS only).pt
Contains the point to which the bubble references (SHNN_SHOW only).
Remarks
WM_NOTIFY messages are sent to the window registered as the sink window when the notification was added. The lParam of the WM_NOTIFY message contains a pointer to this NMSHN structure.
A message is sent to the sink window with hdr.code equal to SHNN_SHOW just before the notification handler shows the notification bubble. The member pt contains the point to which the stem of the notification bubble references. The sink window can return 0 from the window procedure to tell the notification handler not to display the notification bubble. Otherwise, it should return 1.
A message is sent to the sink window with hdr.code equal to SHNN_LINKSEL when a link is tapped in the notification bubble (that is not of the form <A HREF="cmd:#"></A>). For this message, pszLink contains a pointer to the link text for the selected link. The sink window can specify a return value by placing it into dwReturn and returning 1 from the message processing. Otherwise, it should just return 0 and the default return value will be used. This is used to prevent the notification handler from removing the notification after the link is selected; set dwReturn to IDCANCEL to do this.
A message is sent to the sink window with hdr.code equal to SHNN_DISMISS when the bubble goes away. The fTimeout member is equal to TRUE if the notification bubble's timeout duration expired, and FALSE if it is going away for some other reason, such as the user link selection or tapping elsewhere.
Requirements
Pocket PC: Pocket PC 2002 and later.
OS Versions: Windows CE 3.0 and later.
Header: Aygshell.h
Library: Aygshell.lib.
Send Feedback on this topic to the authors