 |
|
 |
Greate article. It worked perfect. And, I wanted to zoom out the whole window so that the picture & text remain inside not missing the bottom part. It is possible here? Please suggest me. I've been searching this for a long time.
Thanks in advance!!
|
|
|
|
 |
|
 |
Couldn't you use the default WebBrowser control and change ScrollbarsEnabled to FALSE and the ContextMenuStrip to NONE?
|
|
|
|
 |
|
 |
hi Sumit Kapoor,
i am using your code in my application and its really great work.
i am compiling under vc 7 .net 2003 and its giving me following errors
please kindly help me
Regards
Jubin
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(65) : error C2146: syntax error : missing ';' before identifier 'idColumnID'
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(65) : error C2501: 'CDataSourceControl::METAROWTYPE::DBCOLUMNID' : missing storage-class or type specifiers
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(65) : error C2501: 'CDataSourceControl::METAROWTYPE::idColumnID' : missing storage-class or type specifiers
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(80) : error C2061: syntax error : identifier 'DBCOLUMNID'
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(87) : error C2143: syntax error : missing ';' before '*'
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(87) : error C2501: 'CDataSourceControl::ICursorMove' : missing storage-class or type specifiers
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(87) : error C2501: 'CDataSourceControl::m_pCursorMove' : missing storage-class or type specifiers
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(88) : error C2143: syntax error : missing ';' before '*'
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(88) : error C2501: 'CDataSourceControl::ICursorUpdateARow' : missing storage-class or type specifiers
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(88) : error C2501: 'CDataSourceControl::m_pCursorUpdateARow' : missing storage-class or type specifiers
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(94) : error C2143: syntax error : missing ';' before '*'
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(94) : error C2501: 'CDataSourceControl::DBCOLUMNBINDING' : missing storage-class or type specifiers
E:\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\..\src\mfc\occimpl.h(94) : error C2501: 'CDataSourceControl::m_pColumnBindings' : missing storage-class or type specifiers
Jubin
|
|
|
|
 |
|
 |
As far as I'm concerned you should use afxocc.h instead of occimpl.h under VC 7 .net 2003 or 2005
Piotr Hoffman
|
|
|
|
 |
|
 |
Hi can anyoane help me ? i have a web control on my project (IE 6.02 XPSP2) main window and when i open a page (navigate) i don't want the page (and aditional files like images) to be saved in cache. I have tryed the solutions from msdn http://support.microsoft.com/kb/234067/EN-US/ but withou result , the flag navNoWriteToCache does not help either
thank you!
|
|
|
|
 |
|
 |
don't use VB and MFC ?
How can I create a webBrowser Contrl in dialog box ?
C++
|
|
|
|
 |
|
 |
Not understand what exact you mean? can you explain more please?
Never consider anything impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
 |
|
 |
Hello, i implemeted this code in eVC 4.0 and I´ve a problem when Link the app.
CustSite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_INTERFACEMAP const COleControlSite::interfaceMap" (__imp_?interfaceMap@COleControlSite@@1UAFX_INTERFACEMAP@@B) referenced in function "prote
cted: static struct AFX_INTERFACEMAP const * __cdecl CCustomControlSite::_GetBaseInterfaceMap(void)" (?_GetBaseInterfaceMap@CCustomControlSite@@KAPBUAFX_INTERFACEMAP@@XZ)
ARMV4IRel/IEViewer.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
I think that is for the redefination, in the custsite.cpp:
#undef AFX_DATA
#define AFX_DATA AFX_DATA_IMPORT
Do you know if I need redefinate with another value?
Thanks for shared your code...
|
|
|
|
 |
|
 |
Sorry Dear, I never tried this with eVC++, So don't have idea. you have to do r&d yourself.
Never consider anything impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
 |
|
 |
Hi sumit,
Thanks for your code. I was searching the code for hiding the scroll bars whole day with no results. Now I can use your code to do that. Does your code supports hiding horizontal scroll bar also.
Besides this, I am having one more problem with Web Browser Control. I am using this control to display an image on my Dialog based application. But the problem is that the Browser Control automatically puts border outside my image.
You can see this around your GaneshJi,s image.
Due to this I need to enlarge the size of the control to fit the image. But I don't want to do this. I need a control that attaches the image from its left-top corner. Actually the browser control takes same settings as that of Internet Explorer. IE also leaves some space around the WebPage.
Can I get rid of this?
Please reply soon. I need this in my project immediately.
Thanks in advance,
Virendra
viru_b4u@rediffmail.com
|
|
|
|
 |
|
 |
Hi, the most simple way to do this might be to generate a temporary HTML-file like <html><head><title>temporary viewer helper</title></head> <body style="border: none; margin: 0px 0px 0px 0px; overflow: hidden"><img src="2.jpg" style="border: none; margin: 0px 0px 0px 0px" alt=""/></body></html> at run-time, of course - and then link to THAT file via e.g. "Navigate2". It is not very elegant, but the whole solution is to be used as a "simple and fast" way to display some media-files (websites, images etc.) any way - so don't bother! In addition to your special problem, this code above also solves the problems claimed in the article, so by using that HTML-file as a "wrapper" for your image-representation IE will not show any borders or scrollbars. The main disadvantage is that you need to generate that file at runtime, if you want to have it for dynamic image-views. For static ones consider to use the res:-protocol and load it that files directly from your executable or resource-DLL. Nice article by the way! Keep it up. Greetings McAlec
|
|
|
|
 |
|
 |
Hello SUMIT KAPOOR, Nice article. And what I really wanted. I wanted to implement in my project. But when I tried to compile your sample it gave compile errors. Compiling... custsite.cpp e:\microsoft visual studio\vc98\include\transact.h(226) : error C2059: syntax error : 'constant' e:\microsoft visual studio\vc98\include\transact.h(271) : error C2143: syntax error : missing ';' before '}' e:\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}' e:\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}' e:\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}' InternetExplorerExperiment.cpp e:\microsoft visual studio\vc98\include\transact.h(226) : error C2059: syntax error : 'constant' e:\microsoft visual studio\vc98\include\transact.h(271) : error C2143: syntax error : missing ';' before '}' e:\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}' e:\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}' e:\microsoft visual studio\vc98\include\oledb.h(17149) : error C2143: syntax error : missing ';' before '}' Generating Code... Error executing cl.exe.
Can you please help me in this regard Regards VYJESH
|
|
|
|
 |
|
 |
Hi Dear,
This is code problem, but your compiler is not finding some header files.
such as transact.h, oledb.h
You can check file as given path in error.
I hope this would solve your problem.
Thanks
Sumit
Never consider anything impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
 |
|
 |
u should simply go to tools options directories and change the hirrachy in the include directories
|
|
|
|
 |
|
 |
Cause: old MSVC6.0 headers and headers in Platform SDK are not compatible.
Solution: remove or rename ...\vc98\include\transact.h and compile with PSDK\include\transact.h
|
|
|
|
 |
|
 |
1. Please tell me and give source code
i want to customize the browser ctl, so that
i can prevent (images,video clips, Activex ctl etc component) download,in MSDN it is given that it can be done by implementing the Ambient property , but complete detail i not get
2. i am using VC++ 6.0 , and (MSDN and In this VC Libraries) i not found the and please tell link from where i download the SDK which contain this , i want that the our DNS server address programetically using GetNetworkParams
Thanks,
charanjetreport_gi@rediffmail.com
ekodeveloper@yahoo.com
|
|
|
|
 |
|
 |
Hi Dear,
sorry but can you tell me what exactly you want to do in detail .
I mean you have placed control in your application. Now what you expect from that & how..I mean what action you performed on that leads to you required result.
Then I'll tr to find out solution that you required + MAJOR THING IS I DON"T HAVE MUCH TIME FOR THIS, BUT I'LL TRY MY BEST .
Thanks
sumit
Never consider anything impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
 |
|
 |
Thanks for response,
The question are refined now:-
1.As you know IE or Any browser use HTTP Connection they first download the main page and then links in them , our Internet connection is slow and i want to be be it fast browser so i want that HTML page text content is dowloaded and rendered and stop at that moment as gif's or Jpeg files eat the time to download , i am using IE ctrl in my application to atomate for some purpose, i tried to stop in OnNavigateComplete2WebBrowser but it not work , i found article in MSDN in (Reusing the WebBrowser Control) and found the following section i copied from MSDN
(Download Control:-
Hosts can control certain aspects of downloading, such as frames, images, Java, and so on, by implementing an ambient property defined as DISPID_AMBIENT_DLCTL. When the host'sIDispatch::Invoke method is called with dispidMember set to DISPID_AMBIENT_DLCTL, it should place zero or a combination of the following values in pvarResult...)
2.i am writing direct mailer, so it need MX record finding , that is done if you have you DNS Server address known , i hear that GetNetworkParam works but in online MSDN it is given to include "iphlpapi.h" and this and "iphlpapi.lib" but these i not find in our VC++ 6.0 Enterprise edition library.
3.How to scroll data in CScrolView window greater than 32k lines , i tried by bypassing the Scrollmsgs using hooks,it works but not smoothly , as VC++ binary editor|RichEdit scroll > 32k
i Hope,you have better understanding about my questions now
Thanks,
|
|
|
|
 |
|
 |
Hi Dear,
I don't have much time to develop a Sample for you. But I'm trying to lead you to solution. Rest is your try & Hardwork.;)
#1 HINT:
DISPID_AMBIENT_DLCTL or DISPID_AMBIENT_DLCONTROL -5512
is implemented using following properties.
#define DLCTL_DLIMAGES 0x00000010
#define DLCTL_VIDEOS 0x00000020
#define DLCTL_BGSOUNDS 0x00000040
#define DLCTL_NO_SCRIPTS 0x00000080
#define DLCTL_NO_JAVA 0x00000100
#define DLCTL_NO_RUNACTIVEXCTLS 0x00000200
#define DLCTL_NO_DLACTIVEXCTLS 0x00000400
#define DLCTL_DOWNLOADONLY 0x00000800
#define DLCTL_NO_FRAMEDOWNLOAD 0x00001000
#define DLCTL_RESYNCHRONIZE 0x00002000
#define DLCTL_PRAGMA_NO_CACHE 0x00004000
#define DLCTL_FORCEOFFLINE 0x10000000
#define DLCTL_NO_CLIENTPULL 0x20000000
#define DLCTL_SILENT 0x40000000
#define DLCTL_OFFLINEIFNOTCONNECTED 0x80000000
These all are used to set properties..Use search engin to find more about these proerties.
#2 HINT :
In my code where this code or proerties should be set..
Class ---> CImpIDispatch
function --> Invoke(DISPID dispIdMember,REFIID,LCID,...............
How to set these above proerties that you have to find out.
I hope these hints may help you.
I'll try to spare some time to implement this code, but frankly speaking..it'll too difficult for me to spare time..but for you I'll try...
So please don't wait for my code..Just try yourself.
for your point 2 & 3. I don't have any idea.
Best of luck.
Thanks
Keep smile
Never consider anything impossible before trying to solve that..---Sumit Kapoor--- sumit_kapoor1980@hotmail.com sumit.kapoor@pecint.com
|
|
|
|
 |
|
 |
Hi
you can download & install windows SDK that have all libraries like this..
I know this must be there.
Bye
Never consider anything impossible before trying to solve that..---Sumit Kapoor--- sumit_kapoor1980@hotmail.com sumit.kapoor@pecint.com
|
|
|
|
 |
|
 |
Can you Give me the URL from where the i will
download that SDK
Thanks,
|
|
|
|
 |
|
 |
Hi
sorry I was on leave for 2 days, so couldn't reply.
check this link,
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/[^]
Downlads=>> Redistributables....
Lot of pending work, so may not give any major help.
Thanks
Never consider anything impossible before trying to solve that..---Sumit Kapoor--- sumit_kapoor1980@hotmail.com
|
|
|
|
 |
|
 |
I tried this and I'm not getting any results.
I debugged a bit and it looks like the CustomOCCManager isn't even used/called after I called
AfxEnableControlContainer(pMgr);
I'm working in vc7, is there some incompability there?
|
|
|
|
 |
|
 |
You might try this article, it helped me!
http://www.codeguru.com/Cpp/W-D/doc_view/chtmlview/article.php/c3253/
|
|
|
|
 |
|
 |
Hi,
I had similar problem and as I am new to MFC, referred article did not help me. Following instructions in available src code worked but doing same in new project did not work.
I also noticed that the path I see for ActiveX control 'Microsoft Web Browser' is ieframe.dll instead which I had expected shdocvw.dll. I've IE7 installed.
Can you explain why CustomOCCManager is not called in this case?
Or more importantly what changes should I made in the code to make it work?
Waiting for answers ...
Thanks in advance.
|
|
|
|
 |