Importing html images and links
Posted: Thu Mar 02, 2006 2:34 am
Hi, I have two problems when importing html, images all show as a box with a cross through, and when clicking on links my code gets the text of the link but can't get the actual url... No doubt I'm doing something stupid.
the images in html look something like this:
<img src="http://g-images.amazon.com/images/G/01/ ... ange-arrow" width=10 height=9>
The code I use when a 'link' is clicked is below, it shows the
link 'text' e.g. 'click here' for all 3 message boxes, and never shows
the 'aref' text itself.
Thanks in advance for guidance, I'm sure I"m doing something exceedingly dumb.
void __fastcall TMessageWindow::rvJump(TObject *Sender, int id)
{
TCustomRVFormattedData* RVData;
int ItemNo;
int atag;
AnsiString atxt;
rv->GetJumpPointLocation(id, RVData, ItemNo);
AnsiString url;
RVData->GetTextInfo(ItemNo,atxt,atag);
url = RVData->GetItemTextA(ItemNo);
MainMessageBox(url.c_str(),"Jump","OK","","","","");
MainMessageBox(atxt.c_str(),"Jump2","OK","","","","");
url = RVData->GetItemText(ItemNo);
MainMessageBox(url.c_str(),"Jump3","OK","","","","");
ShellExecute(0, "open", url.c_str(), NULL, NULL, SW_SHOW);
}
the images in html look something like this:
<img src="http://g-images.amazon.com/images/G/01/ ... ange-arrow" width=10 height=9>
The code I use when a 'link' is clicked is below, it shows the
link 'text' e.g. 'click here' for all 3 message boxes, and never shows
the 'aref' text itself.
Thanks in advance for guidance, I'm sure I"m doing something exceedingly dumb.
void __fastcall TMessageWindow::rvJump(TObject *Sender, int id)
{
TCustomRVFormattedData* RVData;
int ItemNo;
int atag;
AnsiString atxt;
rv->GetJumpPointLocation(id, RVData, ItemNo);
AnsiString url;
RVData->GetTextInfo(ItemNo,atxt,atag);
url = RVData->GetItemTextA(ItemNo);
MainMessageBox(url.c_str(),"Jump","OK","","","","");
MainMessageBox(atxt.c_str(),"Jump2","OK","","","","");
url = RVData->GetItemText(ItemNo);
MainMessageBox(url.c_str(),"Jump3","OK","","","","");
ShellExecute(0, "open", url.c_str(), NULL, NULL, SW_SHOW);
}