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.

55 lines
1.5 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: CReadWrite.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 "CReadWrite.h"
  14. #include "CFuncTest.h"
  15. extern CFuncTest g_FuncTest;
  16. CReadWrite::CReadWrite(BOOL bRegression)
  17. {
  18. strcpy(m_szName,"ReadWrite");
  19. m_bRegression=bRegression;
  20. }
  21. CReadWrite::~CReadWrite()
  22. {
  23. }
  24. void CReadWrite::Draw(Graphics *g)
  25. {
  26. Bitmap *paBmTest=new Bitmap((int)TESTAREAWIDTH,(int)TESTAREAHEIGHT,PixelFormat32bppARGB);
  27. Graphics *gTest;
  28. HDC hdcBkgBitmap;
  29. HDC hdcScreen;
  30. gTest=new Graphics(paBmTest);
  31. gTest->Clear(Color(255,206,206,206));
  32. delete gTest;
  33. g->DrawImage(paBmTest,0,0,0,0,(int)TESTAREAWIDTH,(int)TESTAREAHEIGHT,UnitPixel);
  34. for (int i=0;i<20;i++) {
  35. hdcScreen=g->GetHDC();
  36. gTest=new Graphics(paBmTest);
  37. hdcBkgBitmap=gTest->GetHDC();
  38. StretchBlt(hdcBkgBitmap,0,0,(int)TESTAREAWIDTH,(int)TESTAREAHEIGHT,hdcScreen,m_ix,m_iy,(int)TESTAREAWIDTH,(int)TESTAREAHEIGHT,SRCCOPY);
  39. gTest->ReleaseHDC(hdcBkgBitmap);
  40. delete gTest;
  41. g->ReleaseHDC(hdcScreen);
  42. g->DrawImage(paBmTest,0,0,0,0,(int)TESTAREAWIDTH,(int)TESTAREAHEIGHT,UnitPixel);
  43. }
  44. delete paBmTest;
  45. }