1. stdafx.h 에 추가

#ifdef _DEBUG

#define CreateConsole()        AllocConsole(); freopen("CONOUT$", "wt", stdout)

#define DestroyConsole()    FreeConsole()


#define conout( s )                        printf( s )

#define conout1( s, a )                    printf( s, a )

#define conout2( s, a, b )                printf( s, a, b )

#define conout3( s, a, b, c )            printf( s, a, b, c )

#define conout4( s, a, b, c, d )        printf( s, a, b, c, d )

#else

#define CreateConsole();

#define DestroyConsole();   


#define conout( s );

#define conout1( s, a );

#define conout2( s, a, b );

#define conout3( s, a, b, c );

#define conout4( s, a, b, c, d );

#endif


2. 선언 : CreateConsole();
             - InitInstance 재정의 부분이나 다른 초기화 부분에서
3. 해제 : DestroyConsole();
             - ExitInstance 재정의 부분이나 다른 종료 코드에서..

      카테고리 없음  |  2008. 7. 30. 10:54



jekalmin's Blog is powered by Daum