프로그래밍/기법
2014. 4. 18.
[윈도] 윈도우 프로시져의 멤버 함수화
많이들 쓰는 듯... class MyClass; LRESULT CALLBACK WndProc( HWND hHwnd, UINT msg, WPARAM wParam, LPARAM lParam ){LRESULT result;static MyClass *pthis = (MyClass*) GetWindowLong( hWnd, GWL_USERDATA ); if ( pthis == NULL && msg == WM_NCCREATE ){void *userdata = (void*)( ((CREATESTRUCT*) lParam)->lpCreateParam );SetWindowLong( hWnd, GWL_USERDATA, userdata );result = DefWindowProc( hWnd, msg, wParam, lPara..