From: FefeOxy on
Hi,

I'm trying to use the AfxBeginThread function that is declared within
afxwin.h. however, each time I tried to #include <afxwin.h> , it throw
me the error "fatal error C1189: #error : WINDOWS.H already included.
MFC apps must not #include <windows.h>"

so naturally I commented out the #include <windows.h> and it gives me
the same error. However, I cannot take out the #include <windows.h>
that resides within my header file because of obvious reasons.

Is there anyway to get around this because without including the
afxwin.h, I get "error C3861: 'AfxBeginThread': identifier not found,
even with argument-dependent lookup".

Thanks.

From: Ed Weir (ComCast) on
"FefeOxy" <jacksun007(a)gmail.com> wrote in message
news:1139871908.965720.49890(a)g43g2000cwa.googlegroups.com...
| Hi,
|
| I'm trying to use the AfxBeginThread function that is declared within
| afxwin.h. however, each time I tried to #include <afxwin.h> , it throw
| me the error "fatal error C1189: #error : WINDOWS.H already included.
| MFC apps must not #include <windows.h>"
|
| so naturally I commented out the #include <windows.h> and it gives me
| the same error. However, I cannot take out the #include <windows.h>
| that resides within my header file because of obvious reasons.

Um, WHAT obvious reasons? Please enumerate.

|
| Is there anyway to get around this because without including the
| afxwin.h, I get "error C3861: 'AfxBeginThread': identifier not found,
| even with argument-dependent lookup".
|
| Thanks.
|

From: FefeOxy on
o sorry. I forgot to state the fact that the header file declares my
Windows Form.

From: Ed Weir (ComCast) on
"FefeOxy" <jacksun007(a)gmail.com> wrote in message
news:1139875198.220045.259400(a)o13g2000cwo.googlegroups.com...
|o sorry. I forgot to state the fact that the header file declares my
| Windows Form.
|
Did you try including afxwin.h in the WinForm instead of windows.h?