 |
|
 |
How would I gain a handle to show/hide this 'Find' dialog box. The CHTMLView is just one of the tabs on my worksheet I am making, so if they click on a different tab and switch the window this modeless dialog is still floating there. I would rather not just find a window so if anyone knows how to hook this window as its created plz let me know. Thanks for any help.
|
|
|
|
 |
|
 |
When I open a html ,which has a Applet, by the WebBrowser Control (the Control is hosted in a Dialog-based Application ) ,I got some error
("Free block 0x**** modified after it was freed")
What's the reason ?
colin
|
|
|
|
 |
|
 |
It seemed to me this code can not be used in C# directly,Can you give me some help for changing this code into C# Application ,Thanks
-- modified at 4:16 Saturday 22nd April, 2006
|
|
|
|
 |
|
 |
U R the man! U saved me from a lot of trouble with this. 10x again;)
|
|
|
|
 |
|
 |
Is it possible to implement a save with the CWebBrowser control so that it offers the possibillity to either save as "Web Page, complete" or as "Web Archive, single file" like in "File>>Save As ..." in Internet Explorer? This all because I need to save stylesheets and images too. philippe
|
|
|
|
 |
|
 |
This code is Borland C++, but I think this will help you:
TVariant vIn, vOut;
CppWebBrowser1->ControlInterface->ExecWB(Shdocvw_tlb::OLECMDID_SAVEAS,
Shdocvw_tlb::OLECMDEXECOPT_PROMPTUSER, &vIn, &vOut);
This code shows the original Save As Dialog of the IE.
Marcus
|
|
|
|
 |
|
|
 |
|
 |
how to navigate to HTML page from resouces?
were rgrtgrtvrtrt rtrtb brt tyuhjghj hbhbnh hnjm 1234567?
|
|
|
|
 |
|
 |
(1) Place all your HTML files in your resource with a resource type of "HTML".
(2) All pictures referenced in the HTML file need to be placed is the same resource group under "HTML". eg <img src="picture.jpg"> would require picture.jpg being placed in the "HTML" resource group
(3) HINSTANCE hInstance = AfxGetResourceHandle();
ASSERT(hInstance != NULL);
LPTSTR lpszModule = new TCHAR[_MAX_PATH];
//Get The Application Path
if (GetModuleFileName(hInstance, lpszModule, _MAX_PATH))
{
//Add the IE Res protocol
CString strResourceURL;
strResourceURL.Format(_T("res://%s/%d"), lpszModule, IDR_ASTAD);
m_WebCtrl.Navigate(strResourceURL, NULL, NULL, NULL, NULL);
}
delete lpszModule;
where IDR_ASTAD is the resource name of your HTML file.
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
 |
|
 |
Can I use it with CHtmlView derived classes. If yes then what changes have to make?
|
|
|
|
 |
|
 |
Hi, try this
void CSFHtmlView::Find()
{
static const GUID cmdGUID =
{ 0xED016940, 0xBD5B, 0x11CF, { 0xBA, 0x4E, 0x00, 0xC0, 0x4F, 0xD7, 0x08, 0x16 } };
DWORD nCmdID = 1;
LPDISPATCH lpDispatch = NULL;
LPOLECOMMANDTARGET lpOleCommandTarget = NULL;
HRESULT hr = m_pBrowserApp->get_Document( &lpDispatch );
if( FAILED(hr) || lpDispatch == NULL )
{
ASSERT(FALSE);
return;
}
lpDispatch->QueryInterface( IID_IOleCommandTarget, (void**)&lpOleCommandTarget);
ASSERT(lpOleCommandTarget);
lpDispatch->Release();
lpOleCommandTarget->Exec(&cmdGUID, nCmdID, 0, NULL, NULL);
lpOleCommandTarget->Release();
}
Marcos Mori de Siqueira
http://www.softfactory.com.br
|
|
|
|
 |
|
 |
How can I get the HTML text from a CWebbrower2 Control ?
I tried a lot of things, like use IHTMLDocumment2, and then use IHRMLElement2.
I used the code that follows:
CComPtr pDoc = m_browser.GetDocument();
.
.
.
CComQIPtr< IHTMLDocumment2, &IID_IHTMLDocumment2 > pHTML(pDoc);
BSTR bstr;
pHTML->toString(bstr);
.
.
.
The problem here is that I don't know how to use the value stored in bstr to retrive the HTML text, if you know something send a response.
Thanks
|
|
|
|
 |
|
 |
How can I get the HTML text from a CWebbrower2 Control ?
I tried a lot of things, like use IHTMLDocumment2, and then use IHRMLElement2.
I used the code that follows:
CComPtr pDoc = m_browser.GetDocument();
.
.
.
CComQIPtr pHTML(pDoc);
BSTR bstr;
pHTML->toString(bstr);
.
.
.
The problem here is that I don't know how to use the value stored in bstr to retrive the HTML text, if you know something send a response.
Thanks
|
|
|
|
 |
|
 |
Try this!
// CWebBrowser2 *m_pBrowse = new CWebBrowser2; etc...
IHTMLDocument2 *pdoc=new IHTMLDocument2(m_pBrowse->GetDocument());
IHTMLElement *pel=new IHTMLElement(pdoc->GetActiveElement());
CString htmltxt=pel->GetOuterHTML();
delete pel;
delete pdoc;
|
|
|
|
 |
|
 |
Is anyone aware of the arguments that this find dialog method invocation can take so I can pass through any intersting params in the VARIANTARG structure when calling the Exec method on the Command Target?
My particular interest is to prime the dialog and/or to just use the underlying find functionality and suppress the dialog.
Thanks.
Tim.
|
|
|
|
 |
|
|
 |
|
 |
I using CHtmlView to develop my application(Visual C++ 6.0)..
I've been tried to get explore dc(CHtmlView or explore activeX control) for
saving BMP.. but I couldn't..
If using GetDC() to get explore dc, program was down with debug window..
How can I write out entire contents of CHtmlView into bitmap file??
|
|
|
|
 |
|
 |
Can I disactived action, when user right click into CWebBrowser ??
|
|
|
|
 |
|
 |
Yes you can, BUT I can't remeber how. I'll have a look and let you know.......
|
|
|
|
 |
|
 |
Please, can you have a look?
I also looking for the solution for hiding the standard IExplorer right-click menu, or even to implement my own.
|
|
|
|
 |
|
 |
The solution is to implement the interface IID_IDocHostUIHandler, especially the method ShowContextMenu. Even if this article [^] uses Borland C++, you may find useful info in it.
HTH,
I don't feel it anymore
I don't see, anymore
I don't hear, anymore
I don't speak anymore,
I don't feel
|
|
|
|
 |
|
 |
Better late than never!;P
September's MSDN magazine
<BODY oncontextmenu="return false">
|
|
|
|
 |
|
|
 |
|
 |
In the visual studio dialog editor, insert an activeX control called "Microsoft Web Browser". Then attach a member variable to it (I called mine m_htmlview).
Use....
m_htmlview.Navigate("file_name", NULL, NULL, NULL, NULL);
to view the web page required, and then when say a button is pressed execute the code in this article.
Also have a look at Colin Davies code, as that may help aswell.
Oh yes, have a look in MSDN for CWebBrowser2....
|
|
|
|
 |
|
 |
To invoke Internet Explorer's 'Save Web Page' dialog (which you get from Save As on IE's File menu, set nCmdID to OLECMDID_SAVEAS.
Cheers,
Bria
|
|
|
|
 |