본문 바로가기

Programming/Win32 API

0.7. WndProc 메세지 처리 함수

0.7. WndProc 메세지 처리 함수

// 메세지처리함수
LRESULT CALLBACK WndProc( HWND hWnd , UINT message, WPARAM wParam, LPARAM lParam )
{
        int wmId , wmEvent;
        PAINTSTRUCT ps ;
        HDC hdc ;

        switch(message )
       {
        case WM_DESTROY :
               // 종료
               PostQuitMessage(0 );
               break;
        default:
               // 사용자가 처리하고 남은 메세지 들을 운영체제 에게 넘긴다
               return DefWindowProc (hWnd, message,wParam ,lParam);
       }
        return 0 ;
}