프로그래밍 팁

AdjustWindowRect, 윈도우 작업크기설정

바보 악마 2010. 8. 31. 20:29
        RECT crt;
        SetRect( &crt, 0, 0, nWidth, nHeight );
        AdjustWindowRect( ( &crt ), windowStyle, false );


        m_hWND = CreateWindow(
            m_strClassName.c_str(),
            m_strWindowName.c_str(),
            windowStyle,
            nX,
            nY,
            crt.right - crt.left,
            crt.bottom - crt.top,
            hParent,
            hMenu,
            m_hInstance,
            NULL
            );




혹은 윈도우 생성 후 라면 이런식으로 설정

{

SetWindowPos(hWnd,NULL,0,0,crt.right-crt.left,crt.bottom-crt.top,
   SWP_NOMOVE | SWP_NOZORDER);

}

'프로그래밍 팁' 카테고리의 다른 글

ase Rijndael 암호화 프로그램  (0) 2010.09.10
평면 그리기 plane draw  (0) 2010.09.01
마우스 좌표 얻기  (0) 2010.08.31
C Runtime 환경의 메모리 릭 잡는 방법 ( Memory Leak )  (0) 2010.08.10
gimbal lock test  (0) 2010.07.30