Introducing the password input box in the web page and generally different, he has no handle, but you can get it through the IHTMLINPUTTEXTELEMENT interface!
This article teaches you how to get the contents of the box in the web page. How do you want to get a password in a web page, just change the IF (LSTRCMPI (")) == 0) to IF (LSTRCMPI (")) == 0) If you add a real-time monitoring, you have become a password to steal the program! Main ideas: Get the IE's IHTMLINPUTTEXTELEMENT interface so you can get the contents of the input box (including the text and password input box) in the web page. WARNING: This code is only used as the use of learning and programming tests. It is strictly forbidden to use it for business or illegal purposes. Otherwise, all consequences have nothing to do! If you want to reprint, please contact the author! CopyRight (c) 2002. All Rights Reserved.
VARIANT id, index; CComPtr
V_I4 (& index) = 0; if (SUCCEEDED (pElementCol-> item (id, index, & spDispatch))) if (SUCCEEDED (spDispatch-> QueryInterface (IID_IHTMLFormElement, (void **) & pFormElement))) {// AfxMessageBox ( " IHTMLFORMELEMENT "); long Q = 0; if (succeeded (pformelement-> get_length); for (long (long j = 0; j <= (q-1); j ) {v_vt (& id) = vt_i4 ; V_I4 (& id) = j; V_VT (& index) = VT_I4; V_I4 (& index) = 0; if (SUCCEEDED (pFormElement-> item (id, index, & spDispatch))) if (SUCCEEDED (spDispatch-> QueryInterface (IID_IHTMLInputTextElement, (void **) & pInputElement))) {// AfxMessageBox ( "already acquired IHTMLInputTextElement"); CComBSTR value; CComBSTR type; pInputElement-> get_type (& type); // Get the type of the input box (or box password text boxes) CString strtype (Ty PE); start.makeupper (); if (lstrcmpi (")) == 0) {PINPUTELEMENT-> Get_Value (& value); // Get the value of the text box CSTRING STRVALUE (Value); AFXMESSAGEBOX Strvalue);}}}}}}}} Note: Please see the original code when specific details! It is best not to support the author! thanks for reading! Tanxin79@163.net, the source code of the article: http://www.vchelp.net/asp/ibr_upload/791.rar