Load images from the web with rvHTMLViewImport...
Load images from the web with rvHTMLViewImport...
Is there a demo on how to load images from Internet when using rvHTMlViewImport?
Also is there an easy way to paste HTML from clipboard using rvHTMLViewImport?
There is no paste method so I need to manually import from string from the clipboard location pointer. And images, again...
Also is there an easy way to paste HTML from clipboard using rvHTMLViewImport?
There is no paste method so I need to manually import from string from the clipboard location pointer. And images, again...
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I understand that you do not support THTMLViewer but I can't get OnImageRequest working in C++. Can you please help me out? I guess that my function is not correct.
The error I receive is:
Thank you in advance for your help!
Code: Select all
HTMLViewer1->OnImageRequest = HTMLViewerImageRequest;
void __fastcall TForm1::HTMLViewerImageRequest(TObject *Sender, const String SRC, TMemoryStream *Stream)
{
// do something
}
Code: Select all
[C++ Error] Unit1.cpp(341): E2034 Cannot convert 'void (_fastcall * (_closure )(TObject *,const AnsiString,TMemoryStream *))(TObject *,const AnsiString,TMemoryStream *)' to 'TGetImageEvent'
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Code: Select all
void __fastcall TForm1::HTMLViewerhtStreamRequest(TObject *Sender, const String SRC, TMemoryStream* &Stream)
{
TMemoryStream *memStream = new TMemoryStream();
try {
IdHTTP1->Get(sDomain + SRC, memStream);
memStream->Position = 0;
Stream = new TMemoryStream();
Stream->LoadFromStream(memStream);
}
__finally
{
memStream->Free();
}
}
//-----------------------------------------------------------------------------