Compartilhar via


NM_HTMLCONTEXT

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_HTMLCONTEXT structure in the pnmHtmlContext parameter of the NM_CONTEXTMENU notification 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 NMHDR structure, 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 dwCookie member of the INLINEIMAGEINFO structure referenced in the lParam of the DTM_SETIMAGE message. 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_HTMLCONTEXT structure. 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

Reference

HTML Control API Structures
NM_CONTEXTMENU
INLINEIMAGEINFO