Click here to Skip to main content
15,888,803 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwhy does it use so many memory [modified][Solved] Pin
yu-jian5-Jun-10 5:25
yu-jian5-Jun-10 5:25 
AnswerRe: why does it use so many memory Pin
Aescleal5-Jun-10 6:17
Aescleal5-Jun-10 6:17 
GeneralRe: why does it use so many memory Pin
yu-jian6-Jun-10 3:10
yu-jian6-Jun-10 3:10 
GeneralRe: why does it use so many memory Pin
Aescleal6-Jun-10 7:18
Aescleal6-Jun-10 7:18 
AnswerRe: why does it use so many memory Pin
Hristo-Bojilov5-Jun-10 6:24
Hristo-Bojilov5-Jun-10 6:24 
QuestionRe: why does it use so many memory Pin
Randor 5-Jun-10 7:02
professional Randor 5-Jun-10 7:02 
QuestionRe: why does it use so many memory Pin
David Crow7-Jun-10 4:17
David Crow7-Jun-10 4:17 
QuestionHow to Save Image from WebBrowser control Pin
voo doo125-Jun-10 5:23
voo doo125-Jun-10 5:23 
Hi everybody. I'm tring to save image form webBrowser control. and i have the following code
mshtml::HTMLDocument^ document = dynamic_cast<mshtml::HTMLDocument^>(this->webBrowser1->Document->DomDocument); 
mshtml::IHTMLElementCollection^ collImages = document->getElementsByTagName(L"img"); 
				 
for (int i = 0; i < collImages->length; ++i) 
{ 
   mshtml::IHTMLImgElement^ img = safe_cast<mshtml::IHTMLImgElement^>(collImages->item(nullptr, i)); 
   mshtml::IHTMLElementRender^ render = dynamic_cast<mshtml::IHTMLElementRender^>(img); 

   Bitmap^ bmp = gcnew Bitmap(img->width, img->height); 
   Graphics^ g = Graphics::FromImage(bmp); 
   IntPtr hdc = g->GetHdc(); 
   <big>render->DrawToDC(hdc); </big> //Here is the Error
   g->ReleaseHdc(hdc); 
   delete g; g = nullptr;
   bmp->Save(L"C:\\Test\\SaveImage.Jpg", System::Drawing::Imaging::ImageFormat::Jpeg);					
}


I get the following error message

Error C2664: 'mshtml::IHTMLElementRender::DrawToDC' : cannot convert parameter 1 from 'System::IntPtr' to 'mshtml::_RemotableHandle %'

is there any one who knows how to fix this?
AnswerRe: How to Save Image from WebBrowser control Pin
Hristo-Bojilov5-Jun-10 6:35
Hristo-Bojilov5-Jun-10 6:35 
GeneralRe: How to Save Image from WebBrowser control Pin
voo doo125-Jun-10 7:21
voo doo125-Jun-10 7:21 
GeneralRe: How to Save Image from WebBrowser control Pin
Hristo-Bojilov5-Jun-10 8:14
Hristo-Bojilov5-Jun-10 8:14 
GeneralRe: How to Save Image from WebBrowser control Pin
voo doo125-Jun-10 16:09
voo doo125-Jun-10 16:09 
GeneralRe: How to Save Image from WebBrowser control [modified] Pin
Hristo-Bojilov6-Jun-10 2:57
Hristo-Bojilov6-Jun-10 2:57 
GeneralRe: How to Save Image from WebBrowser control Pin
voo doo126-Jun-10 4:54
voo doo126-Jun-10 4:54 
GeneralRe: How to Save Image from WebBrowser control Pin
Hristo-Bojilov6-Jun-10 5:06
Hristo-Bojilov6-Jun-10 5:06 
Question0xC0000138: Ordinal Not Found Pin
eusto5-Jun-10 1:51
eusto5-Jun-10 1:51 
AnswerRe: 0xC0000138: Ordinal Not Found Pin
Randor 5-Jun-10 6:28
professional Randor 5-Jun-10 6:28 
GeneralRe: 0xC0000138: Ordinal Not Found Pin
eusto5-Jun-10 7:36
eusto5-Jun-10 7:36 
GeneralRe: 0xC0000138: Ordinal Not Found Pin
Randor 5-Jun-10 7:49
professional Randor 5-Jun-10 7:49 
GeneralRe: 0xC0000138: Ordinal Not Found Pin
eusto5-Jun-10 8:50
eusto5-Jun-10 8:50 
GeneralRe: 0xC0000138: Ordinal Not Found Pin
Randor 5-Jun-10 9:24
professional Randor 5-Jun-10 9:24 
QuestionHow to covert CString to LPCSTR ? Pin
wangningyu4-Jun-10 20:46
wangningyu4-Jun-10 20:46 
AnswerRe: How to covert CString to LPCSTR ? Pin
Richard MacCutchan4-Jun-10 21:19
mveRichard MacCutchan4-Jun-10 21:19 
GeneralRe: How to covert CString to LPCSTR ? Pin
wangningyu4-Jun-10 21:23
wangningyu4-Jun-10 21:23 
GeneralRe: How to covert CString to LPCSTR ? Pin
Richard MacCutchan4-Jun-10 22:11
mveRichard MacCutchan4-Jun-10 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.