ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • MFC 지원
    Platform/설정 2009. 1. 22. 15:52
    프로젝트 설정 대화상자의 'Microsoft Foundation Classes:' 콤보 상자에서 MFC 사용을 선택


    #define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers

    #include <afx.h>
    #include <afxwin.h>         // MFC core and standard components
    #include <afxext.h>         // MFC extensions
    #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

    CWinApp theApp;

    int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
    {
        int nRetCode = 0;

        // initialize MFC and print and error on failure
        if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
        {
            // TODO: change error code to suit your needs
            nRetCode = 1;
            return nRetCode;
        }
        ...
        return nRetCode;
    }
    /*
    or

    #include <afxwin.h>

    */
Designed by Tistory.