Solved

IE toolbar that works in visual studio c++ .net

Posted on 2003-10-24
8
2,403 Views
Last Modified: 2013-12-14
I am looking for tutorial or sample source code on how to Build simple IE toolbar in Visual c++ .net
I have found several samples and tutorials in code guru and other sites but they were only for visual c++ 6
i tried to use them but could not get them to work in visual c++ .net
So if you have one that works for visual studion .net , you wull be awarded 500 points
0
Comment
Question by:basara55
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 19

Expert Comment

by:Dexstar
ID: 9617901
basara55,
> I am looking for tutorial or sample source code on how to Build simple IE
> toolbar in Visual c++ .net

Try this one from CodeProject.
    http://www.codeproject.com/wtl/toolband.asp

It will totally work with VS.NET, but it might need some tweaking.  If you can't get it to work, post the problems and I'll help you get it worked out.

Hope that helps,
Dex*
0
 

Author Comment

by:basara55
ID: 9618039
I can't get to install that Atl object wizard ...  There is no directory
 C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Template\ATL

closest i could find is

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\VCWizards

but still it is not showing up in new projects ??? i also registered that dll too
0
 
LVL 19

Expert Comment

by:Dexstar
ID: 9618091
I would forget about that wizard.  Just download the sample project and change it to meet your needs.  I mean, all you asked for is a sample.  You don't need the wizard to compile the sample.

If you can get it to compile, then hurray:  you've got your sample.
If you can't get it to compile, post the errors you get, and we'll keep going.

Dex*
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:basara55
ID: 9618302
Cool thanks for your help , I am new to c++ so i appreciate all of the help

I tried to compile it and these are errors

c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2440: 'initializing' : cannot convert from 'ATL::_ATL_CREATORARGFUNC (__stdcall *)' to 'DWORD_PTR'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2787: 'IInputObject' : no GUID has been associated with this object
c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2440: 'initializing' : cannot convert from 'DWORD_PTR' to 'const IID *'
c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2440: 'initializing' : cannot convert from 'ATL::_ATL_CREATORARGFUNC (__stdcall *)' to 'DWORD_PTR'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2787: 'IInputObject' : no GUID has been associated with this object
c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2440: 'initializing' : cannot convert from 'DWORD_PTR' to 'const IID *'
        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2440: 'initializing' : cannot convert from 'ATL::_ATL_CREATORARGFUNC (__stdcall *)' to 'DWORD_PTR'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2787: 'IInputObject' : no GUID has been associated with this object
c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\gooddesktop\ToolBandObj.h(56): error C2440: 'initializing' : cannot convert from 'DWORD_PTR' to 'const IID *'
        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
0
 

Author Comment

by:basara55
ID: 9623493
Can you figure out these errors ?  Anyone
0
 
LVL 19

Accepted Solution

by:
Dexstar earned 500 total points
ID: 9623858
basara55:

> Can you figure out these errors ?  Anyone

I got some of those errors, but not as many as you did.  However, all my errors were on line 56, and so are yours.  So, here is what I did to fix it.

Change Line 56 from this:
      COM_INTERFACE_ENTRY(IInputObject)

To this:
      COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)

Good luck,
Dex*
0
 

Author Comment

by:basara55
ID: 9630966
That worked Thanks a lot for your help  , Why was that causing compiling error ?  
0
 
LVL 19

Expert Comment

by:Dexstar
ID: 9634564
basara55:

No problem.  I'm glad you got it working.

It seems in the new compiler, they rearranged the header files so that the GUID is separate from the interface, and so the compiler couldn't associate it the IID with the interface.  The change we made explicitly says what the IID for the interface is, so the compiler had no problems.  If you look at the code, he does a similiar thing for at least one other interface.

Hope that helps,
Dex*
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Eclipse Neon start with Admin account only 6 180
Need a simple RegEx to search for two words 27 125
Why use this lambda? 12 96
maximize the sum of fractions 33 76
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question