다른거 필요 없고 아래 한줄 넣어 주고 printf 함수 사용하면 된다.
#pragma comment ( linker , "/entry:WinMainCRTStartup /subsystem:console" )
위 코드로 생성된 DEBUG 용 콘솔 윈도우 위치를 화면의 0 , 0 으로 고정시키기
wchar_t ConsolWindowTitle [ 1024 ] ;
GetConsoleTitle ( ConsolWindowTitle , _countof ( ConsolWindowTitle ) ) ;
HWND hConsol = ::FindWindow ( nullptr , ConsolWindowTitle ) ;
GetWindowRect ( hConsol , &rc ) ;
MoveWindow ( hConsol , 0 , 0 , rc.right - rc.left , rc.bottom - rc.top , TRUE ) ;
본 프로그램을 우하단으로 위치 시키기
GetWindowRect ( FindWindow ( L"Shell_TrayWnd" , nullptr ) , &rc ) ; // 데스크바 크기를 구한다.
MoveWindow ( g_MainWindowHandle , rc.right - width , rc.top - height , width , height , TRUE ) ;
'Technical Report' 카테고리의 다른 글
Crypto++ (0) | 2012.05.13 |
---|---|
winapi - 한글 영문 전환 (0) | 2011.07.14 |
Tree-View Control의 TVS_CHECKBOXES 속성 문제점 (0) | 2011.03.26 |
배치파일 (0) | 2009.07.30 |
Visual Studio C/C++ Compiler Option (0) | 2009.07.20 |