Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "stdafx.h"
  8. #include "hammer.h"
  9. #include "MDIClientWnd.h"
  10. // memdbgon must be the last include file in a .cpp file!!!
  11. #include <tier0/memdbgon.h>
  12. BEGIN_MESSAGE_MAP(CMDIClientWnd, CWnd)
  13. //{{AFX_MSG_MAP(CMDIClientWnd)
  14. ON_WM_ERASEBKGND()
  15. //}}AFX_MSG_MAP
  16. END_MESSAGE_MAP()
  17. //-----------------------------------------------------------------------------
  18. // Purpose: Constructor.
  19. //-----------------------------------------------------------------------------
  20. CMDIClientWnd::CMDIClientWnd()
  21. {
  22. }
  23. //-----------------------------------------------------------------------------
  24. // Purpose: Destructor.
  25. //-----------------------------------------------------------------------------
  26. CMDIClientWnd::~CMDIClientWnd()
  27. {
  28. }
  29. //-----------------------------------------------------------------------------
  30. // Purpose: Makes our background color mesh with the splash screen for maximum effect.
  31. //-----------------------------------------------------------------------------
  32. BOOL CMDIClientWnd::OnEraseBkgnd(CDC *pDC)
  33. {
  34. // Set brush to desired background color
  35. CBrush backBrush(RGB(141, 136, 130)); // This color blends with the splash image!
  36. // Save old brush
  37. CBrush *pOldBrush = pDC->SelectObject(&backBrush);
  38. CRect rect;
  39. pDC->GetClipBox(&rect); // Erase the area needed
  40. pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
  41. pDC->SelectObject(pOldBrush);
  42. return TRUE;
  43. }