description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: DDX_DHtml Helper Macros |
DDX_DHtml Helper Macros |
11/04/2016 |
|
|
c46302d2-ea43-4fea-bfc2-6f590d99f267 |
The DDX_DHtml helper macros allow easy access to the commonly used properties of controls on an HTML page.
Name | Description |
---|---|
DDX_DHtml_ElementValue | Sets or retrieves the Value property from the selected control. |
DDX_DHtml_ElementInnerText | Sets or retrieves the text between the start and end tags of the current element. |
DDX_DHtml_ElementInnerHtml | Sets or retrieves the HTML between the start and end tags of the current element. |
DDX_DHtml_Anchor_Href | Sets or retrieves the destination URL or anchor point. |
DDX_DHtml_Anchor_Target | Sets or retrieves the target window or frame. |
DDX_DHtml_Img_Src | Sets or retrieves the name of an image or a video clip in the document. |
DDX_DHtml_Frame_Src | Sets or retrieves the URL of the associated frame. |
DDX_DHtml_IFrame_Src | Sets or retrieves the URL of the associated frame. |
Header: afxdhtml.h
Sets or retrieves the destination URL or anchor point.
DDX_DHtml_Anchor_Href(
CDataExchange* dx,
LPCTSTR name,
CString& var)
dx
A pointer to a CDataExchange object.
name
The value that you specified for the HTML control's ID parameter.
var
The value being exchanged.
This macro calls the CDHtmlDialog::DDX_DHtml_ElementText function using the DISPID_IHTMLANCHORELEMENT_HREF dispatch ID.
Sets or retrieves the target window or frame.
DDX_DHtml_Anchor_Target(
CDataExchange* dx,
LPCTSTR name,
CString& var)
dx
A pointer to a CDataExchange object.
name
The value that you specified for the HTML control's ID parameter.
var
The value being exchanged.
This macro calls the CDHtmlDialog::DDX_DHtml_ElementText function using the DISPID_IHTMLANCHORELEMENT_TARGET dispatch ID.
Sets or retrieves the HTML between the start and end tags of the current element.
DDX_DHtml_ElementInnerHtml(
CDataExchange* dx,
LPCTSTR name,
CString& var)
dx
A pointer to a CDataExchange object.
name
The value that you specified for the HTML control's ID parameter.
var
The value being exchanged.
This macro calls the CDHtmlDialog::DDX_DHtml_ElementText function using the DISPID_IHTMLELEMENT_INNERHTML dispatch ID.
Sets or retrieves the text between the start and end tags of the current element.
DDX_DHtml_ElementInnerText(
CDataExchange* dx,
LPCTSTR name,
CString& var)
dx
A pointer to a CDataExchange object.
name
The value that you specified for the HTML control's ID parameter.
var
The value being exchanged.
This macro calls the CDHtmlDialog::DDX_DHtml_ElementText function using the DISPID_IHTMLELEMENT_INNERTEXT dispatch ID.
Sets or retrieves the Value property from the selected control.
DDX_DHtml_ElementValue(
CDataExchange* dx,
LPCTSTR name,
var)
dx
A pointer to a CDataExchange object.
name
The value that you specified for the HTML control's ID parameter.
var
The value being exchanged. See value in CDHtmlDialog::DDX_DHtml_ElementText.
This macro will only succeed when run on controls that have a Value property. Controls that have a Value property include edit boxes, list boxes, and combo boxes.
This macro calls the CDHtmlDialog::DDX_DHtml_ElementText function using the DISPID_A_VALUE dispatch ID.
Sets or retrieves the URL of the associated frame.
DDX_DHtml_Frame_Src(
CDataExchange* dx,
LPCTSTR name,
CString& var)
dx
A pointer to a CDataExchange object.
name
The value that you specified for the HTML control's ID parameter.
var
The value being exchanged.
This macro calls the CDHtmlDialog::DDX_DHtml_ElementText function using the DISPID_IHTMLFRAMEBASE_SRC dispatch ID.
Sets or retrieves the URL of the associated frame.
DDX_DHtml_IFrame_Src(
CDataExchange* dx,
LPCTSTR name,
CString& var)
dx
A pointer to a CDataExchange object.
name
The value that you specified for the HTML control's ID parameter.
var
The value being exchanged.
This macro calls the CDHtmlDialog::DDX_DHtml_ElementText function using the DISPID_IHTMLFRAMEBASE_SRC dispatch ID.
Gets or retrieves the name of an image or a video clip in the document.
DDX_DHtml_Img_Src(
CDataExchange* dx,
LPCTSTR name,
CString& var)
dx
A pointer to a CDataExchange object.
name
The value that you specified for the HTML control's ID parameter.
var
The value being exchanged.
When using the DDX_DHtml_Img_Src macro to retrieve the src property for an IMAGE element, the Internet Explorer image object will return the fully escaped URL for the image source. For example, if you use the DDX_DHtml_Img_Src macro to set the src property of an IMAGE element to the string "some interesting picture," when you retrieve that property, Internet Explorer will return the string "res://d:\myapplication\myapp.exe/some%20interesting%20picture."
This macro calls the CDHtmlDialog::DDX_DHtml_ElementText function using the DISPID_IHTMLIMGELEMENT_SRC dispatch ID.