Click here to Skip to main content
15,893,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: code generation failed Pin
Niklas L20-Sep-10 20:55
Niklas L20-Sep-10 20:55 
AnswerRe: code generation failed Pin
rp_suman21-Sep-10 9:08
rp_suman21-Sep-10 9:08 
QuestionCapEditCopy and its data retrieval format. Explanation wanted. Pin
Vaclav_20-Sep-10 7:32
Vaclav_20-Sep-10 7:32 
AnswerRe: CapEditCopy and its data retrieval format. Explanation wanted. Pin
Phil J Pearson20-Sep-10 12:09
Phil J Pearson20-Sep-10 12:09 
GeneralRe: CapEditCopy and its data retrieval format. Explanation wanted. Pin
Vaclav_20-Sep-10 13:58
Vaclav_20-Sep-10 13:58 
QuestionCBitmapButton not taking keyboard inputs. Pin
Member 383463020-Sep-10 4:19
Member 383463020-Sep-10 4:19 
AnswerRe: CBitmapButton not taking keyboard inputs. [modified] Pin
Aescleal20-Sep-10 5:27
Aescleal20-Sep-10 5:27 
QuestionSave web page Pin
VVVimal19-Sep-10 23:37
VVVimal19-Sep-10 23:37 
Visual C++ Solution
Accomplishing this task from a Visual C++ host is very straightforward. You can use an IWebBrowser2 interface to call the QueryInterface method for the IHTMLDocument2 interface. After you obtain a pointer to the document, then call QueryInterface for the IPersistFile interface. After you obtain this interface pointer, you can call the save method to save the file to disk.

HRESULT hr = E_FAIL;
IDispatch* pDisp = NULL;
IHTMLDocument2* pDoc = NULL;

pDisp = m_webOC.GetDocument();

if(SUCCEEDED(hr = pDisp->QueryInterface(IID_IHTMLDocument2,(void**)&pDoc)))
{
IPersistFile* pFile = NULL;
if(SUCCEEDED(pDoc->QueryInterface(IID_IPersistFile,(void**)&pFile)))
{
LPCOLESTR file = L"c:\\test1.htm";
pFile->Save(file,TRUE);
}
}

Hi all

I have seen this ariticle in MSDN.
In that i don't know m_webOC belongs to which object. If so how to create that object.
QuestionRe: Save web page Pin
CPallini19-Sep-10 23:59
mveCPallini19-Sep-10 23:59 
AnswerRe: Save web page Pin
VVVimal20-Sep-10 0:08
VVVimal20-Sep-10 0:08 
GeneralRe: Save web page Pin
«_Superman_»20-Sep-10 0:12
professional«_Superman_»20-Sep-10 0:12 
GeneralRe: Save web page [modified] Pin
CPallini20-Sep-10 0:40
mveCPallini20-Sep-10 0:40 
GeneralRe: Save web page Pin
mesajflaviu22-Sep-10 22:55
mesajflaviu22-Sep-10 22:55 
GeneralRe: Save web page Pin
CPallini22-Sep-10 23:00
mveCPallini22-Sep-10 23:00 
QuestionCombining all files in single file Pin
learningvisualc19-Sep-10 22:31
learningvisualc19-Sep-10 22:31 
AnswerRe: Combining all files in single file Pin
«_Superman_»19-Sep-10 22:54
professional«_Superman_»19-Sep-10 22:54 
AnswerRe: Combining all files in single file PinPopular
Aescleal20-Sep-10 0:33
Aescleal20-Sep-10 0:33 
QuestionSending email with attachment problem Pin
AnayKulkarni19-Sep-10 19:33
AnayKulkarni19-Sep-10 19:33 
QuestionRe: Sending email with attachment problem Pin
David Crow20-Sep-10 5:37
David Crow20-Sep-10 5:37 
QuestionHow to make the Memory Pool thread safe ? [modified][solved] Pin
yu-jian19-Sep-10 17:50
yu-jian19-Sep-10 17:50 
AnswerRe: How to make the Memory Pool thread safe ? [modified] Pin
Aescleal20-Sep-10 0:07
Aescleal20-Sep-10 0:07 
GeneralRe: How to make the Memory Pool thread safe ? Pin
Maximilien20-Sep-10 1:28
Maximilien20-Sep-10 1:28 
GeneralRe: How to make the Memory Pool thread safe ? Pin
Aescleal20-Sep-10 6:02
Aescleal20-Sep-10 6:02 
AnswerRe: How to make the Memory Pool thread safe ? [modified][solved] Pin
basementman23-Sep-10 4:37
basementman23-Sep-10 4:37 
AnswerRe: How to make the Memory Pool thread safe ? [modified][solved] Pin
Blake Miller28-Sep-10 11:24
Blake Miller28-Sep-10 11:24 

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.