Newbie CFile problem
-
Any thoughts on the problem below will be a great help: I am trying to use CFile in an MFC app. My thinking is that it should be available with no further includes as stdafx is included which includes windows.h? However vc++ tell me CFile is an undeclared identifier. CFile is declared in afx.h however I can't include afx.h by itself as the compiler complains that windows.h is being redeclared. What am I missing... Just another typist
-
Any thoughts on the problem below will be a great help: I am trying to use CFile in an MFC app. My thinking is that it should be available with no further includes as stdafx is included which includes windows.h? However vc++ tell me CFile is an undeclared identifier. CFile is declared in afx.h however I can't include afx.h by itself as the compiler complains that windows.h is being redeclared. What am I missing... Just another typist
By default, windows.h is not directly included in stdafx.h. You should have at least included afxwin.h. Others you might have are afxext.h and afxdtctl.h.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
By default, windows.h is not directly included in stdafx.h. You should have at least included afxwin.h. Others you might have are afxext.h and afxdtctl.h.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
Many thanks! This has pointed me on the right track. I have found similar posts and the answer seems to be afxwin.h. Unfortunately I still can't compile: _DllMain@12 already defined in HookFunc.obj I have found a Microdoft specific knwledge base article describing this problem but that relates to specific modules that there is a problem with. I don't think that's what I'm seeing, more likely I'm just doing something dumb. Just another typist
-
Many thanks! This has pointed me on the right track. I have found similar posts and the answer seems to be afxwin.h. Unfortunately I still can't compile: _DllMain@12 already defined in HookFunc.obj I have found a Microdoft specific knwledge base article describing this problem but that relates to specific modules that there is a problem with. I don't think that's what I'm seeing, more likely I'm just doing something dumb. Just another typist
It appears that you have more than one instance of
DllMain()
in the project's .c or .cpp files.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen