TCppWebBrowser Click

#include
#include "shlwapi.h"

IHTMLDocument2 *document;
IHTMLElement *body;
(void *)document=CWB->Document;
IHTMLElementCollection *collection;
document->get_all(&collection);
long count_links;
collection->get_length(&count_links);
for(int i=0;iitem(v1,v1,&linkDisp);
if(linkDisp!=NULL)
{
WideString url;
linkDisp->QueryInterface(IID_IHTMLElement,(void**)&body);
body->get_outerHTML(&url);
String temp=String(url);
if(url.Length()<2000&&url.Length()>20)
{
if(url==s){body->click();return true;}
}
}
}