![]() |
|
|
| Subject:
Using getAttribute function !!!
Category: Computers > Internet Asked by: hareum-ga List Price: $3.00 |
Posted:
06 May 2004 19:13 PDT
Expires: 06 May 2004 19:15 PDT Question ID: 342436 |
I use the getAttribute function of IHTMLElement class.
I want MFC application get the attribute of the HTML file.
But the getAttribute function always get null value.
I show you the MFC code and HTML source.
Please help me.
// This is MFC code
void
CCyberChatDlg::OnChat()
{
IHTMLDocument2* pCtrl=(IHTMLDocument2*)m_oMainDlg.m_pWebCtrl->GetHtmlDocument();
IHTMLWindow2 *pWindow=(IHTMLWindow2*)NULL;
pCtrl->get_parentWindow(&pWindow);
IHTMLElement* pElement=(IHTMLElement*)NULL;
pCtrl->get_body(&pElement);
HRESULT hResult;
VARIANT oAttr;
hResult=pElement->getAttribute(L"strMSG.value", 1, &oAttr);
// oAttr always return 0 !!!
}
// HTML Source
<html>
<head>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0" >
<INPUT name="strMSG" ID="strMSG" size="53" style="FONT-SIZE: 9pt;
COLOR: #333333; FONT-FAMILY: ??">
</body>
</html> |
|
| There is no answer at this time. |
|
| There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
| Search Google Answers for |
| Google Home - Answers FAQ - Terms of Service - Privacy Policy |