axWebBrowser in MC++
-
Hi all! I have done following to generate the assemblies for AXSHDocVw.dll SHDocVw.dll aximp c:\windows\system32\shdocvw.dll then I have added the reference to generated assemblies in my project and then I dragged and droped the asWebBrowser control in my form which added the reference to these assemblies again from c:\windows\system32 folder which I have removed from the references. Now when I compile it, I get compiler errors which are mentioned below: error C2653: 'AxInterop' : is not a class or namespace name error C2501: 'Testing::Form1::AxWebBrowser' : missing storage-class or type specifiers error C2501: 'Testing::Form1::axWebBrowser2' : missing storage-class or type specifiers All of these errors are pointing towards only one line of code in my form's header file which is: private: AxInterop::SHDocVw::AxWebBrowser * axWebBrowser2; All I want to do is, to load text,html,xml files from my hard drive to axWebBrowser control for display. Please Help!!!!!:doh: osAma
-
Hi all! I have done following to generate the assemblies for AXSHDocVw.dll SHDocVw.dll aximp c:\windows\system32\shdocvw.dll then I have added the reference to generated assemblies in my project and then I dragged and droped the asWebBrowser control in my form which added the reference to these assemblies again from c:\windows\system32 folder which I have removed from the references. Now when I compile it, I get compiler errors which are mentioned below: error C2653: 'AxInterop' : is not a class or namespace name error C2501: 'Testing::Form1::AxWebBrowser' : missing storage-class or type specifiers error C2501: 'Testing::Form1::axWebBrowser2' : missing storage-class or type specifiers All of these errors are pointing towards only one line of code in my form's header file which is: private: AxInterop::SHDocVw::AxWebBrowser * axWebBrowser2; All I want to do is, to load text,html,xml files from my hard drive to axWebBrowser control for display. Please Help!!!!!:doh: osAma
If you are getting an Interop error saying that the namespace does not exist, it's because Visual Studio .NET can not find the generated assembly. Where is it? You can put it in your project directory, this is a default Visual Studio search location. You can also set the search path by right clicking on the project in the Solution Explorer and setting the path in the appropriate property page. Read this from MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfVCDirectoriesProjectsOptionsDialogBox.asp[^] You want to set the path for the reference files. You must select this from the dropdown menu (the default is the #include directory). Also, Adam Nathan does exactly what you are doing in his book, ".NET and COM: The Complete Interoperability Guide"; he provides all the code and an very clear explanation about how and why you are doing what you are doing. If you are new to this kind of thing, I would recommend reading the book, it's excellent.
-
If you are getting an Interop error saying that the namespace does not exist, it's because Visual Studio .NET can not find the generated assembly. Where is it? You can put it in your project directory, this is a default Visual Studio search location. You can also set the search path by right clicking on the project in the Solution Explorer and setting the path in the appropriate property page. Read this from MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfVCDirectoriesProjectsOptionsDialogBox.asp[^] You want to set the path for the reference files. You must select this from the dropdown menu (the default is the #include directory). Also, Adam Nathan does exactly what you are doing in his book, ".NET and COM: The Complete Interoperability Guide"; he provides all the code and an very clear explanation about how and why you are doing what you are doing. If you are new to this kind of thing, I would recommend reading the book, it's excellent.
Thank you very much for such a great help!!!! Cheers