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 structure contains information about the target of an event inside an HTML viewer control. The HTML viewer control passes the container application a pointer to an NM_HTMLCONTEXTstructure in the pnmHtmlContextparameter of the NM_CONTEXTMENUnotification message.

Syntax

typedef struct tagNM_HTMLCONTEXT {
  NMHDR 
hdr;
  POINT 
pt;
  UINT 
uTypeFlags;
  LPTSTR 
szLinkHREF;
  LPTSTR 
szLinkName;
  DWORD 
dwUnused1;
  DWORD 
dwImageCookie;
  DWORD 
dwUnused2;
} NM_HTMLCONTEXT;

Members

hdr

An NMHDRstructure, specifying the type of notification message being sent and identifying the control that sent it.

pt

A point that contains the screen coordinates of the event.

uTypeFlags

Designates the type of object that the user selected. It is one of the values specified in the following table.

Constant Description

HTMLCONTEXT_BACKGROUND

The target of the event is a background object. This could be anything other than a link or an image.

HTMLCONTEXT_LINK

The target of the event is an HTML link.

HTMLCONTEXT_IMAGE

The target of the event is an image.

HTMLCONTEXT_IMAGENOTLOADED

The target of the event is an image that has not been loaded yet.

szLinkHREF

A null-terminated string that contains the URL of the link that the user selected. The value in this member is only valid if the HTMLCONTEXT_LINK flag is set in the uTypeFlagsmember.

szLinkName

A null-terminated string that contains the NAME of the link that the user selected. The value in this member is only valid if the HTMLCONTEXT_LINK flag is set in the uTypeFlagsmember.

dwUnused1

This member is no longer used. Set to zero.

dwImageCookie

Specifies the cookie value that was originally passed from the application to the HTML viewer control in the dwCookiemember of the INLINEIMAGEINFOstructure referenced in the lParamof the DTM_SETIMAGEmessage. The value in this member is only valid if the HTMLCONTEXT_IMAGE flag is set in the uTypeFlagsmember.

dwUnused2

This member is no longer used. Set to zero.

Remarks

Never modify any of the data inside the NM_HTMLCONTEXTstructure. The HTML viewer control uses this data internally. Do not attempt to store or free any of the pointers contained in this structure. If you need to retain one of the strings for later use, make a copy of it.

Requirements

Header htmlctrl.h
Library htmlctrl.lib
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also