MFC support in ATL project


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: MFC support in ATL project

  1. #1
    Join Date
    Jul 2005
    Posts
    17

    MFC support in ATL project

    Hi all, I've done an ATL project but now I have to add a slider and the only way to add it (that I know) is to add to the STDAFX.H this:
    Code:
    #include <afxwin.h>         // MFC core and standard components
    #include <afxext.h>         // MFC extensions
    #include <afxdisp.h>        // MFC Automation classes
    #include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
    #ifndef _AFX_NO_AFXCMN_SUPPORT
    #include <afxcmn.h>			// MFC support for Windows Common Controls
    #endif // _AFX_NO_AFXCMN_SUPPORT
    But I receive this fatal error:

    Compiling...
    stdafx.cpp
    C:\Programs\Microsoft Visual Studio 8\VC\atlmfc\include\afxv_w32.h(16) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>

    I've searched on google but every way I've tried had no effects.

    Need help :(

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    I think you can use the #pragma once directive to ensure that a header file isn't #included multiple times. I suspect that the problem lies elsewhere, i.e., the project's settings or the precompiled headers option but try the pragma first.
    Danny Kalev

Similar Threads

  1. Control Arrays in VB.NET
    By Gary Nelson in forum .NET
    Replies: 277
    Last Post: 10-01-2003, 12:00 AM
  2. Good Editorial by Russell Jones
    By Robert G in forum .NET
    Replies: 84
    Last Post: 02-08-2001, 02:38 PM
  3. Replies: 0
    Last Post: 09-13-2000, 10:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center