WINDOWS.H already included. MFC apps must not #include <windows.h></windows.h>
-
hi ppl, I got this framework which obiously includes windows.h... :mad: And I got a static library which includes afxwin.h. I need afxwin.h because I want to use CCmdTarget class. And I got this error: WINDOWS.H already included. MFC apps must not #include <windows.h> :mad: I am not creating a MFC application and I need CCmdTarget class and I cannot remove windows.h... :~ Any workarounds?? :confused: Thank you all.. :)
-
hi ppl, I got this framework which obiously includes windows.h... :mad: And I got a static library which includes afxwin.h. I need afxwin.h because I want to use CCmdTarget class. And I got this error: WINDOWS.H already included. MFC apps must not #include <windows.h> :mad: I am not creating a MFC application and I need CCmdTarget class and I cannot remove windows.h... :~ Any workarounds?? :confused: Thank you all.. :)
The
CCmdTarget
class is part of MFC. So you don't have the option of not using MFC.«_Superman_» I love work. It gives me something to do between weekends.
-
hi ppl, I got this framework which obiously includes windows.h... :mad: And I got a static library which includes afxwin.h. I need afxwin.h because I want to use CCmdTarget class. And I got this error: WINDOWS.H already included. MFC apps must not #include <windows.h> :mad: I am not creating a MFC application and I need CCmdTarget class and I cannot remove windows.h... :~ Any workarounds?? :confused: Thank you all.. :)
You can include all the MFC stuff first. This way, you can be sure that windows.h is already included for the framework that comes next. But, like the other poster said, you are going to be building an MFC application.
It is a crappy thing, but it's life -^ Carlo Pallini