HTMLCONTEXT

This structure contains information about the target of an ALT+Tap event inside an HTML viewer control. The HTML viewer control passes the container application a pointer to an HTMLCONTEXT structure in the pnmHtmlContext parameter of the NM_CONTEXTMENU notification message.

At a Glance

Header file: Htmlctrl.h
Windows CE versions: 2.0 and later

Syntax

typedef struct tagHTMLCONTEXT {
NMHDR
hdr;
POINT
pt;
UINT
uTypeFlags;
LPSTR
szLinkHREF;
LPSTR
szImageSrc;
HBITMAP
hbmImage;
DWORD
dwImageCookie;
} HTMLCONTEXT;

Members

hdr

NMHDR structure, specifying the type of notification message being sent and identifying the control that sent it.

pt

Point that contains the screen coordinates of the event.

uTypeFlags

Desginates the type of object on which the user ALT+Tapped. It is one of the following values:

Value Description
HTMLCONTEXT_BACKGROUND The target of the ALT+Tap event is a background object. This could be anything other than a link or an image.
HTMLCONTEXT_LINK The target of the ALT+Tap event is an HTML link.
HTMLCONTEXT_IMAGE The target of the ALT+Tap event is an image.
HTMLCONTEXT_IMAGENOTLOADED The target of the ALT+Tap event is an image that has not been loaded yet.

szLinkHREF

Null-terminated string that contains the URL of the link on which the user ALT+Tapped. The value in this member is only valid if the HTMLCONTEXT_LINK flag is set in the uTypeFlags member.

szImageSrc

Null-terminated string that contains the source URL of the image that is the target of the ALT+Tap event. The value in this member is only valid if the HTMLCONTEXT_IMAGE flag is set in the uTypeFlags member.

hbmImage

Handle to the bitmap associated with the image on which the user ALT+Tapped. The value in this member is only valid if the HTMLCONTEXT_IMAGE flag is set in the uTypeFlags member.

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 uTypeFlags member.

Remarks

Never modify any of the data inside the 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.

See Also

NM_CONTEXTMENU