Dear all,
I met the similar case, need your help :
I wrote a MFC Dll and I can use the dll in my MFC App successfully. but when I try include it in a service project, compile the service will get the error: c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14)> > fatal error C1189: #error : WINDOWS.H already included. MFC apps must
not #include <windows.h>
How should use the mfc dll in the service???.
Really Appreciate your replies!
PhoebeYu
Quote:
|
Originally Posted by Mihai N.
> CStrings are part of MFC. In order to use CString (and the other nice
> features of MFC such as dynamic arrays), you need to create your app as an
> MFC dll.
You have to set the project to use MFC (in static lib or shared dll).
This is not the same as making your DLL a MFC DLL.
After VC6, CString is also part of ATL.
You can create a generic DLL, include atlstr.h and set the project to use
ATL, static or dynamic.
Mihai
--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email
|