[MFC] User_MSG 사용법
1. #define WM_USER_MSG (WM_USER+10000) 2. 사용자 메세지를 해당 class h, cpp에 등록한다. //xxx.h 정의입니다. afx_msg LRESULT OnTestMessage( WPARAM wParam, LPARAM lParam ); //xxx.cpp 구현입니다. LRESULT CTestView::OnTestMessage( WPARAM wParam, LPARAM lParam ) { ... } 3. 이제 메세지를 맵핑하여 만들어둔 함수를 동작하게 할 준비를 합니다. BEGIN_MESSAGE_MAP(CTestView Cwnd) ON_MESSAGE(WM_USER_MSG, OnTestMessage) END_MESSAGE_MAP() 4. 사용법 CWnd* pWnd = AfxG..
2011.07.27