Atl in WinForms app

  • Thread starter Thread starter Maxim
  • Start date Start date
M

Maxim

Hello everybody,

I have problems with using atl classes inside a WinForms application. I've
already posted a message here. I've tried different approaches with no
success.
Maybe somebody could show me a simple WinForms project that uses for example
CComBstr class.

PS. I'm using C++/CLI and VS2005.

Thanks in avance.
 
Hi Maxim!
I have problems with using atl classes inside a WinForms application. I've
already posted a message here. I've tried different approaches with no
success.
Maybe somebody could show me a simple WinForms project that uses for example
CComBstr class.

- Create a new Windows-Forms Applikation
- Open Project-Settings
- Change "Configuration-Properties|General":
- "Use of ATL" to "Dynamic Link to ATL"
- "Common language runtime support" to "Common Language Runtime Support
(/clr)"

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Hi Maxim!
I have problems with using atl classes inside a WinForms application. I've
already posted a message here. I've tried different approaches with no
success.
Maybe somebody could show me a simple WinForms project that uses for example
CComBstr class.

Sorry... I forgot one:

- and place
#include <atlbase.h>
- right after "#pragma once" in "stdafx.h"

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Hi Jochen,

Thanks for reply.

Well I've done that like a million times before. But I'm getting the debug
assertion whenever I include atlbase.h in my project. I've tried different
workarounds but nothing worked for me. So I asked for a simple project here
because I think that there is probably something wrong with my configuration
or something.
Have you tried to run this simple project yourself? If it works for you,
then could you post the project code here please.

And thanks again.
Maxim
 
Back
Top