//----------------------------------------------------------------------------- // Name: MsgProc() // Desc: The window's message handler //----------------------------------------------------------------------------- LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) { switch( msg ) { case WM_DESTROY: { PostQuitMessage( 0 ); return 0; } break; case WM_KEYDOWN: { switch( wParam ) { case VK_ESCAPE: //Cleanup(); PostQuitMessage( 0 ); return 0; break; } } break; case WM_SIZE: if (wParam != SIZE_MINIMIZED) { context.Resize(hWnd, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); } return 0; }//end switch( msg ) return DefWindowProc( hWnd, msg, wParam, lParam ); }
//----------------------------------------------------------------------------- // Name: MsgProc() // Desc: The window's message handler //----------------------------------------------------------------------------- LRESULT WINAPI MsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_SIZE: if (wParam != SIZE_MINIMIZED) { // TODO: Resetear el AntTeakBar // TwWindowSize(0, 0); s_Context.Resize(hWnd, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); // TODO: Resetear el AntTeakBar // TwWindowSize((UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); } return 0; case WM_DESTROY: { PostQuitMessage(0); return 0; } break; }//end switch( msg ) return DefWindowProc(hWnd, msg, wParam, lParam); }