Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
4/8/2010

This Windows Mobile structure contains a notification message and codes for window-based notification. The notification's dwIDis in hdr.idFrom.

Syntax

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.idFromcontains the notification's unique identifier ( dwID); hdr.codeis one of the following values.

Value Description

SHNN_LINKSEL

pszLinkcontains the link text of the choice that was selected.

SHNN_DISMISS

fTimeoutis TRUE if duration expired, FALSE if user tapped away.

SHNN_SHOW

ptcontains the point to which the bubble points.

SHNN_NAVLEFT

Toast stack left spinner clicked, D-pad left action.

SHNN_NAVRIGHT

Toast stack right spinner clicked, D-pad right action.

SHNN_VIEWITEM

Toast D-pad action.

SHNN_INITMENU

Indicates menu coming up, and that hMenu is in lParam.

SHNN_ICONCLICKED

ptcontains the coordinates of the point where the user clicked.

lParam

The lParamfor 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 lParamof the WM_NOTIFY message contains a pointer to this NMSHNstructure.

A message is sent to the sink window with hdr.codeequal to SHNN_SHOW just before the notification handler shows the notification bubble. The member ptcontains 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.codeequal 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, pszLinkcontains a pointer to the link text for the selected link. The sink window can specify a return value by placing it into dwReturnand 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 dwReturnto IDCANCEL to do this.

A message is sent to the sink window with hdr.codeequal to SHNN_DISMISS when the bubble goes away. The fTimeoutmember 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

Header aygshell.h
Library aygshell.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2002 and later

See Also

Reference

Shell Structures