Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trying to include <afxwin.h>

141 views
Skip to first unread message

FefeOxy

unread,
Feb 13, 2006, 6:05:09 PM2/13/06
to
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.

Ed Weir (ComCast)

unread,
Feb 13, 2006, 6:53:53 PM2/13/06
to
"FefeOxy" <jacks...@gmail.com> wrote in message
news:1139871908....@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.

FefeOxy

unread,
Feb 13, 2006, 7:01:43 PM2/13/06
to
o sorry. I forgot to state the fact that the header file declares my
Windows Form.

Ed Weir (ComCast)

unread,
Feb 13, 2006, 10:30:32 PM2/13/06
to
"FefeOxy" <jacks...@gmail.com> wrote in message
news:1139875198.2...@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?

0 new messages