Error including <windows.h> with MFC
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Error including <windows.h> with MFC

  1. #1
    Join Date
    May 2003

    Error including <windows.h> with MFC

    I find this error when compiling a class which includes some .h files, and many of them surely includes <windows.h>

    The error is:
    c:\archivos de programa\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>

    The problem is that only when including a class made by me, which includes <afxwin.h> or <afxmt.h>, the error appears. No problem with other included .h files which include <windows.h>

  2. #2
    Join Date
    Sep 2003
    Forever Gone... For Now...
    #include <windows.h> after you include <afxwin.h> or <afxmt.h>
    Thought for the day/week/month/year:
    Windows System Error 4006:
    Replication with a nonconfigured partner is not allowed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)