Message 1 of 3
Compilation error between "afxwin.h" and "windows.h" (MFC

Not applicable
10-30-2001
09:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody ! ... I'm very happy to find this news group talking about
ARX developpement.
... Well, I'm using the ObjectArxSDK 2000 to create my arx file. I'm really
not expert, just starting ... so ....
I have created an arx file without mfc support because I just needed an
'InputMonitor' class first ... I have finished and I can create the Arx file
with no errors, and also load it.
... -> But know, i want to install a hook on AutoCAD and i always don't need
any mfc support for my project but, i have seen that it is required for the
Hooks, so i have written 2 more includes files in the "stdafx.h" file :
____________________________________________________________________
#include "afxwin.h" // need this because rxmfcapi.h needs windows header.
#include "rxmfcapi.h"
____________________________________________________________________
Because the 'acedRegisterFilterWinMsg()' and 'acedRemoveFilterWinMsg()'
function are defined in it. But now i get a new 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
______________________________________________________________________
A error message generated by an #error directive in "afxv_w32.h" file
(VC6++)
So, what can i do ? I can not include the "afxwin.h" in my project because
of the "'Windows.h' already include error". And if i don't put the
"afxwin.h" file, i get errors in the "rxmfcapi.h" file.
Does it mean that i have to re-start all my project from the begining and
check for MFC support ? Or perhaps i can change some options for the linker,
or something else ??? I have already chek for MFC support in the preoject
settings, because it was not. But nothing has changed, i've got always the
error .
Well, thank's to anyone ...
Driss.
ARX developpement.
... Well, I'm using the ObjectArxSDK 2000 to create my arx file. I'm really
not expert, just starting ... so ....
I have created an arx file without mfc support because I just needed an
'InputMonitor' class first ... I have finished and I can create the Arx file
with no errors, and also load it.
... -> But know, i want to install a hook on AutoCAD and i always don't need
any mfc support for my project but, i have seen that it is required for the
Hooks, so i have written 2 more includes files in the "stdafx.h" file :
____________________________________________________________________
#include "afxwin.h" // need this because rxmfcapi.h needs windows header.
#include "rxmfcapi.h"
____________________________________________________________________
Because the 'acedRegisterFilterWinMsg()' and 'acedRemoveFilterWinMsg()'
function are defined in it. But now i get a new 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
______________________________________________________________________
A error message generated by an #error directive in "afxv_w32.h" file
(VC6++)
So, what can i do ? I can not include the "afxwin.h" in my project because
of the "'Windows.h' already include error". And if i don't put the
"afxwin.h" file, i get errors in the "rxmfcapi.h" file.
Does it mean that i have to re-start all my project from the begining and
check for MFC support ? Or perhaps i can change some options for the linker,
or something else ??? I have already chek for MFC support in the preoject
settings, because it was not. But nothing has changed, i've got always the
error .
Well, thank's to anyone ...
Driss.