Counter Strike : Global Offensive Source Code
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.

69 lines
2.0 KiB

  1. //========= Copyright � 1996-2005, 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_LBUTTONDOWN()
  15. ON_WM_ERASEBKGND()
  16. //}}AFX_MSG_MAP
  17. END_MESSAGE_MAP()
  18. //-----------------------------------------------------------------------------
  19. // Purpose: Handles the left mouse button click event.
  20. //-----------------------------------------------------------------------------
  21. void CMDIClientWnd::OnLButtonDown(UINT nFlags, CPoint point)
  22. {
  23. // user clicked on the Hammer background so open a new map
  24. APP()->OnFileOpen();
  25. }
  26. //-----------------------------------------------------------------------------
  27. // Purpose: Constructor.
  28. //-----------------------------------------------------------------------------
  29. CMDIClientWnd::CMDIClientWnd()
  30. {
  31. }
  32. //-----------------------------------------------------------------------------
  33. // Purpose: Destructor.
  34. //-----------------------------------------------------------------------------
  35. CMDIClientWnd::~CMDIClientWnd()
  36. {
  37. }
  38. //-----------------------------------------------------------------------------
  39. // Purpose: Makes our background color mesh with the splash screen for maximum effect.
  40. //-----------------------------------------------------------------------------
  41. BOOL CMDIClientWnd::OnEraseBkgnd(CDC *pDC)
  42. {
  43. // Set brush to desired background color
  44. CBrush backBrush(RGB(141, 136, 130)); // This color blends with the splash image!
  45. // Save old brush
  46. CBrush *pOldBrush = pDC->SelectObject(&backBrush);
  47. CRect rect;
  48. pDC->GetClipBox(&rect); // Erase the area needed
  49. pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
  50. pDC->SelectObject(pOldBrush);
  51. return TRUE;
  52. }