LRESULT MessageHandler()

in cpp/HelloVectors/desktopcompositionwindow.h [109:137]


	LRESULT MessageHandler(UINT const message, WPARAM const wparam, LPARAM const lparam) noexcept
	{
		switch (message) {
		    case WM_DPICHANGED:
		    {
			    return HandleDpiChange(m_window, wparam, lparam);
		    }
		    
		    case WM_DESTROY: 
		    {
		    	PostQuitMessage(0);
		    	return 0;
		    }
		    
		    case WM_SIZE: 
			{
		    	UINT width = LOWORD(lparam);
		    	UINT height = HIWORD(lparam);
		    
		    	mCurrentWidth = width;
		    	mCurrentHeight = height;
		    	if (T *that = GetThisFromHandle(m_window)) 
				{
		    		that->DoResize(width, height);
		    	}
		    }
		}
		return DefWindowProc(m_window, message, wparam, lparam);
	}