Leaked source code of windows server 2003
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.

48 lines
1.0 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: CHDC.cpp
  3. *
  4. * This file contains the code to support the functionality test harness
  5. * for GDI+. This includes menu options and calling the appropriate
  6. * functions for execution.
  7. *
  8. * Created: 05-May-2000 - Jeff Vezina [t-jfvez]
  9. *
  10. * Copyright (c) 2000 Microsoft Corporation
  11. *
  12. \**************************************************************************/
  13. #include "CHDC.h"
  14. #include "CFuncTest.h"
  15. extern CFuncTest g_FuncTest;
  16. CHDC::CHDC(BOOL bRegression)
  17. {
  18. strcpy(m_szName,"HDC");
  19. m_hPal=NULL;
  20. m_hOldPal=NULL;
  21. m_hDC=NULL;
  22. m_bRegression=bRegression;
  23. }
  24. CHDC::~CHDC()
  25. {
  26. }
  27. Graphics *CHDC::PreDraw(int &nOffsetX,int &nOffsetY)
  28. {
  29. Graphics *g=NULL;
  30. m_hDC=GetDC(g_FuncTest.m_hWndMain);
  31. g=Graphics::FromHDC(m_hDC);
  32. return g;
  33. }
  34. void CHDC::PostDraw(RECT rTestArea)
  35. {
  36. if (m_hOldPal)
  37. SelectPalette(m_hDC,m_hOldPal,FALSE);
  38. ReleaseDC(g_FuncTest.m_hWndMain,m_hDC);
  39. DeleteObject(m_hPal);
  40. }