this->windowstate = wsminimized ;
}
else if(str == widestring("ok"))
{
this->mbnum = this->getinputvalue("mbnum");
this->friendname = this->getinputvalue("name");
this->id8751 = this->getinputvalue("id");
this->info = this->getinputvalue("memtextarea");
this->modalresult = mrok;
this->close();
}
else if(str == widestring("cancel"))
{
this->modalresult = mrcancel;
this->close();
}
}
pvarresult->vt = vt_bool;
pvarresult->boolval = false;
}
//---------------------------------------------------------------------------
void __fastcall tfrmaddfriend::cppwebbrowseraddfrienddocumentcomplete(
tobject *sender, lpdispatch pdisp, variant *url)
{
this->cancelevt();
this->setbrowserstyle();
this->moveform();
_di_idispatch disp;
system::delphiinterface<ihtmldocument2> htmldoc2;
system::delphiinterface<ihtmlelement> htmlelem;
disp = this->cppwebbrowseraddfriend->document;
if(!disp)
return;
htmldoc2 = disp;
htmldoc2->get_body(&htmlelem);
tvariant vt;
vt = cfunctionobject<tfrmaddfriend>::createeventfunctionobject(this,&tfrmaddfriend::addfriendonclick,0);
htmlelem->put_onclick(vt);
vt = cfunctionobject<tfrmaddfriend>::createeventfunctionobject(this,&tfrmaddfriend::onkeypressevt,0);
htmlelem->put_onkeypress(vt);
this->setfocusinput("mbnum");
}
//---------------------------------------------------------------------------
void tfrmaddfriend::onkeypressevt(dispid id, variant* pvarresult)
{
//todo: add your source code here
_di_idispatch disp;
system::delphiinterface<ihtmldocument2> htmldoc2;
system::delphiinterface<ihtmlwindow2> htmlwnd2;