This is the text from MSDN comment: "According to the book ATL Internals (2ed) the use of attributes is deprecated and should not be used in new ATL projects."
But WHY?!!
...
I'm running into a perplexing problem with an ActiveX control I'm writing - sometimes, Internet Explorer appears to fail to properly unload the control on process shutdown. This results in the control instance's destructor not being called.
The control is written in C++, uses ATL and it's compiled using Visual Studio 2005. The control i...
I start using the visual studio c++ express 2008 at home but there is no ATL in it.
How can I add ATL to visual studio c++ express 2008?
...
I have an ActiveX control written using the MS ATL library and I am firing events via pDispatch->Invoke(..., DISPATCH_METHOD). The control will be used by a .NET client and my question is this - is the firing of the event a synchronous or asynchronous call? My concern is that, if synchronous, the application that handles the event coul...
I'm trying to do the following without too much special case code to deal with invalidated POSITIONs etc:
What's the best way to fill in the blanks?
void DeleteUnreferencedRecords(CAtlMap<Record>& records)
{
for(____;____;____)
{
if( NotReferencedElsewhere(record) )
{
// Delete record
_______;
}
...
I'm just starting up a new ATL/WTL project and I was wondering if the global _Module variable is still required?
Back a few years when I started working with WTL it was required (at least for ATL 3.0) that you define a global variable such as:
CAppModule _Module;
To get ATL to work correctly. But recently I've read somewhere that th...
Greetings!
I am trying to check directory write-permissions from within a Windows MFC/ATL program using C++. My first guess is to use the C-standard _access function, e.g.:
if (_access("C:\mydir", 2) == -1)
// Directory is not writable.
But apparently on Windows 2000 and XP, _access can't determine directory permissions. (i.e. the...
Since I need to do some checks depending on which control is on focus in my app, I am getting the focused control ID like this:
HWND controlOnFocus = ::GetFocus();
int controlID = ::GetDlgCtrlID(controlOnFocus);
I am getting consistent IDs, but I can't find them in the resource file!
Can I rely on the IDs I am getting or what?
Any he...
I have a simple POJO web service published with Axis2 on Tomcat5.5
I try to consume it with ATL C++ client and it fails. Doing the same with a C# client works.
The problem is that ATL client sends soap body which looks like
<soap:Body>< xmlns="http://fa.test.com/xsd"></></soap:Body></soap:Envelope>
Notice the in...
We have a COM object implemented with C++/ATL that includes a method which will return a DIB. We are also writing a .NET application that will use this COM object. Since we are writing both, we have the liberty of deciding how best to return this DIB from the COM object. To clarify, would it be best to return a native windows handle t...
I'm trying to register an atl service using
ExeName.exe /service
as described here: http://msdn.microsoft.com/en-us/library/74y2334x(VS.80).aspx
After doing so though, it's not appearing in my services control panel (the one that I get to by typing Services in the start box on vista).
I've tried to dig through the atl code to see whe...
I'm hosting an Internet Explorer instance (the Web Control) in an CAxWindow ATL class. How do I prevent that a website could open a new window from the hosted IE? I'm already setting an implementation of IDocHostUIHandlerDispatch to disable the context menu.
...
The "ATL simple object" wizard doesn't provide a way to specify that a new class is derived from an existing coclass and its interface. In Visual Studio 2008, how do I make a new ATL COM class derived from an existing one (i.e. Base implements IBase, and I want to make a new Derived class derived from Base that implements IDerived, where...
The documentation says that CSimpleArray is for dealing with small numbers of objects. What is small in this context? Is CSimpleArray ever a good choice or should I always use a different collection class such as CAtlArray?
...
I have a C++ application using WTL/ATL BEGIN_MSG_MAP_EX macros for message handling. I use some macros from atlcrack.h.
When we upgraded the projects to Visual Studio 2005, intellisense acts crazy. I've tracked the behavior down to the BEGIN_MSG_MAP_EX macro not behaving correctly with intellisense. However, I can not find a way to cont...
I use VS6 and ATL with CServiceModule to implement a custom windows service. In case of a fatal error service should shut itself down. Since CServiceModule is available via _Module variable in all files I thought of something like this to cause CServiceModule::Run to stop pumping messages and shut itself down
PostThreadMessage(_Module.d...
I have an ATL control that I want to be Unicode-aware. I added a message handler for WM_UNICHAR:
MESSAGE_HANDLER( WM_UNICHAR, OnUniChar )
But, for some reason, the OnUniChar handler is never called.
According to the documentation, the handler should first be called with "UNICODE_NOCHAR", on which the handler should return TRUE if you...
I am creating an ATL 8.0 based ActiveX control in C++ using Visual Studio 2008. I need to create a sub-window and attach it to the ActiveX control.
How do I get access to the HWND that is owned by the ActiveX control?
Which ATL function can I override in order to use the HWND after the control's window has been created?
...
I am not familiar with this, and can use a kick start.
I am using ATL (unmanaged C++) user control and would like to use the ShockWave ActiveX object. I need to know how to declare it so that I can set a property or call a method.
For instance, if I could assign a variable to it, then I would like to call 'variable->LoadMovie()'
I kno...
I'm having a problem with an ATL Service that exports a COM object. It works running as a local service, but when running as a Windows Service, I can't connect. The service starts correctly and runs, but my client (code below) always fails with the error "Failed to start service".
So we're looking at the same thing, I've put together a ...