|
i use WTL wiz create MainFrame with menu\status\toolbar, it is strange that the toolbar flicker when resizing the frame. but there are many samples on this site not.
what is the trick ?
thx for your help.
|
|
|
|
|
may be repainting time of your tool bar is larger,or there are a large number of oject on your toolbar or you computer is infected by Toolbar Virus
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi all experts
I have a few COM type libraries from a vendor . In the type libraries, there is only interfaces without coclass
I am using visual c++, can any body show me a sample or teach me how to use the interfaces
thanks
|
|
|
|
|
I'm going to assume that you have the DLL or EXE that belong to each typelib.
Are you able to register the DLL/EXE ?
Can you create any object using VBA (Office) or VB if you add a reference to the typelib ?
DarkByte
|
|
|
|
|
Hi :
i have a set of dll that comes with the type lib.
yes i can register them. however i have also do an object view on all the dll
none of them contain the coclass referencing to the tlb
no i can't create any object using VBA
any other clue
thanks
|
|
|
|
|
Your DLL/EXE will also have the type information. Just reference that and you will be all set.
You can use OLEView to check if the DLL/EXE has the type information in it.
prashu
|
|
|
|
|
hi
i wrote an active x control with the microsoft visual studio .net
it handles the output from my webcam and lets it start and stop.
everything works fine, but just if I run the control on my computer.
on another maschine (also win xp) the control doesnt start in the
browser. (security settings allow it) i suppose i need to pack
some dlls into a cab file.
how do i find out which dll i need to pack into the cab file?
and how do i write the inf document.
beside the standard imports from an atl control project i just
added the #include <vfw.h>
standard imports
#include <afxctl.h> // MFC support for ActiveX Controls
#include <afxext.h> // MFC extensions
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Comon Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
// Delete the two includes below if you do not wish to use the MFC
// database classes
#include <afxdb.h> // MFC database classes
#include <afxdao.h> // MFC DAO database classes
#include <windows.h>
|
|
|
|
|
these are the includes:
I added:
#include <Vfw.h>
(standard active x stuff)
#include <afxctl.h> // MFC support for ActiveX Controls
#include <afxext.h> // MFC extensions
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Comon Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
// Delete the two includes below if you do not wish to use the MFC
// database classes
#include <afxdb.h> // MFC database classes
#include <afxdao.h> // MFC DAO database classes
#include <windows.h>
|
|
|
|
|
how to get post data of form in ATL COM DLL.
i am call Ivoke() using IDispatch interface. In Invoke i am calling the BeforeNavigate2(). But i am getting memory error. can you tell me any example which i can down load and do it.
|
|
|
|
|
Hi, I was toying around with ATL 7.1, and was trying to implement multiple classes. I'm using attributes, and thought I'd done everything right, but when I compiled, it didn't work, and the OLE/COM viewer shows the coclass does not export that interface. To test it out, I right-clicked in class view on the co-class and chose implement interface, pretty much chose one at random and left the functions as they were (returns the not-implemented error code).
Re-built, still didn't show the interface. So, how do I get a co-class to expose the multiple interfaces? The closest thing I saw said "Remove the class declaration and replace it with a traditional one" which I think kind of defeats the purpose of the new attributes. Plus, I'm just starting to learn ATL, so I'd rather learn the new way, then go back, learn the old way, and THEN learn the new way.
|
|
|
|
|
I believe I have it figured out, using the com_interface_entry macro. However, a related bug is when I use that, since my server is based off the ATL shell extension tutorial, I need to use IContextMenu. Even though I #include <shlobj.h> which very clearly shows IContextMenu (it's the first interface it defines), the compiler complains it cannot find the uuid of IContextMenu.
Is there some magic include, some missing lib? Or am I just not reading the right parts of the manual.
|
|
|
|
|
The "no UUID associated" error is due to buggy header files in VC 7. They are missing lines like:
struct __declspec(uuid("guid here...")) IContextMenu; You'll need to add those to your stdafx.h manually.
IMO attributed ATL is horrible, not to mention difficult to debug as you have found out. A couple of weeks ago I was trying to get an attributed sample up and running with Nish. When registering the DLL, the RGS file wasn't being read, and neither of us could figure out why. With all the important bits hidden by attributes, there's no code to step though. We're both bright guys and we were stumped, and Nish's newsgroup searches revealed many similar questions with no answers.
So in short, stick to regular ATL. Again, just MHonestO.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Thanks for pointing all that out. It also helps that most of the examples out there are for regular ATL. The only problem is because of the buggy headers, gotta do a lot of those lines, which includes tracking down the UUID in the OLE/COM tool... any idea when microsoft will release a fixed/updated version?
|
|
|
|
|
|
I found out something... my real problem was the registration script. It only reported 1 interface, but it actually worked, once you added the registration_script() attribute.
Hope this helps you with your problems, maybe you can spread it around the various newsgroups.
|
|
|
|
|
|
Where do you intend your ActiveX control to be used ?
Are you trying to add a Menu in an existing menu or trying to create a brand new Menu ?
Can you give us more input please ?
DarkByte
|
|
|
|
|
I was hoping to create secure webpage editor that resides in internet explorer. This would be primarily for broadband users. I have not figured out how to add any menu to an activex container so it would be brand new.
|
|
|
|
|
According to MSDN's instruction on ATL Server projects, developer may use the 'ATL OLE DB Consumer Wizard ' to generate a class code with one db_command attributes ,and then access database with the SQL string specified in db_command.
All samples demostarte that one class can only has one db_comand attribute. If developer want to SELECT , INSERT and DELETE a table records , he must code at least three classes with one [ db_command ... ] for each.
It's not a good idea.
Anyone know how to define multi [db_command ...] attributes for single class in the ATL project? and how to change the [ db_command ... ] attributes during executetion?
thank in advance
he wen feng
|
|
|
|
|
Only 1 db_command is required using a SELECT statement. If you add DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE to the DBPROP_UPDATABILITY property, the rowset will allow INSERT, UPDATE, and DELETE through it's member functions.
|
|
|
|
|
Reply to Doug:
Thanks your suggestion.
Could you tell me how to specified SQL :-Ocommand string for the class through it's member functions?
|
|
|
|
|
Using OLEDB Attributes is no different than using OLEDB Consumer templates. There are a number of examples on using the OLEDB templates at
http://www.codeproject.com/database/#OLE+DB
|
|
|
|
|
i have got a vector of strings. i would like to sort out all the empty strings.. any neater way to do this than this
struct _IsEmpty
{
operator () (const std::string& s)
{
return s.empty();
}
};
void TransformAbtVStr (std::vector<std::string>& v_str)
{
v_str.erase (std::remove_if (v_str.begin(), v_str.end(), _IsEmpty()), v_str.end());
}
Thanks in advance,
Bernhard
"Just looking for loopholes." W. C. Fields American actor, 1880-1946, explaining why he was reading the Bible on his deathbed.
|
|
|
|
|
vector<string> vecStr;
vector<string>::iterator iterB, iterE;
// put stuff in your vector of strings
iterB = vecStr.begin();
iterE = vecStr.end();
sort(iterB, iterE);
vecStr.erase(unique(iterB, iterE), iterE);
vecStr.resize(vecStr.size());
William
Fortes in fide et opere!
|
|
|
|
|
I'm curious, what is the reason to call the resize method at the end?
David
|
|
|
|