Click here to Skip to main content
13,086,264 members (89,699 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
I have created a simple MFC activex control. I have also added class "Add ATL Support to MFC" for the above project using Add->Add Class. now if I use CComPtr< T> x; its showing CComPtr undefined even though I have included atlbase.h and header files.
Posted 27-Dec-12 1:21am
Updated 27-Dec-12 2:06am
v4
Comments
Richard MacCutchan 27-Dec-12 8:27am
   
What type is T?
sandeepyes 27-Dec-12 8:39am
   
IDispatch
Richard MacCutchan 27-Dec-12 8:49am
   
Why not update your question with some proper detail. Passing one word answers really does not offer anything in the way of explanation.
sandeepyes 27-Dec-12 22:51pm
   
I dont think its the problem with the type or variable. In Visual Studio its saying "CComPtr" is undefined, one of my friend told that the header files and their classes and functions are not loaded, so its not recognizing those keywords.
and the declaration is
CComPtr< IDispatch> spDoc;
I have used the source code from
http://www.codeproject.com/Articles/2352/JavaScript-call-from-C
I have included files WebPage.h and WebPage.cpp from above link for my project and facing the problem.
Member 11037121 18-Jul-17 6:35am
   
Are you integarting how to call javascript from iWebBrowser using c++ as given in source code http://www.codeproject.com/Articles/2352/JavaScript-call-from-C

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Problem solved. I just added ATL namespace as "using namespace ATL;" and the problem solved. thanks to all who helped.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100