home *** CD-ROM | disk | FTP | other *** search
/ Windows Graphics Programming / Feng_Yuan_Win32_GDI_DirectX.iso / Samples / Chapt_03 / Handles / Snapshot.h < prev   
Encoding:
C/C++ Source or Header  |  2000-05-11  |  1.7 KB  |  55 lines

  1. #pragma once
  2.  
  3. //-----------------------------------------------------------------------------------//
  4. //              Windows Graphics Programming: Win32 GDI and DirectDraw               //
  5. //                             ISBN  0-13-086985-6                                   //
  6. //                                                                                   //
  7. //  Written            by  Yuan, Feng                             www.fengyuan.com   //
  8. //  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
  9. //  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
  10. //                                                                                   //
  11. //  FileName   : snapshot.h                                                             //
  12. //  Description: Virtual memory snap shot                                            //
  13. //  Version    : 1.00.000, May 31, 2000                                              //
  14. //-----------------------------------------------------------------------------------//
  15.  
  16. #include "crc.h"
  17.  
  18. // Memory Region
  19. class KRegion
  20. {
  21. public:
  22.     unsigned char * start;
  23.     unsigned        size;
  24.     unsigned        type;
  25.     unsigned short  crc;
  26.     unsigned short  lastcrc;
  27.     int                count;
  28. };
  29.  
  30. class KListView;
  31.  
  32.  
  33. class KSnapShot
  34. {
  35.     typedef enum { nMaxRegionNo = 512 };
  36.  
  37.     KCRC    m_crc;
  38.  
  39.     KRegion m_Regions[nMaxRegionNo];
  40.     int     m_nRegionNo;
  41.     
  42.     KRegion * FindRegion(unsigned char * regionstart, unsigned regionsize);
  43.  
  44. public:
  45.     KSnapShot()
  46.     {
  47.         m_nRegionNo = 0;
  48.     }
  49.  
  50.     void Shot(KListView * list);
  51.     void ShowDetail(HINSTANCE hInst, unsigned start, unsigned size);
  52. };
  53.  
  54.  
  55.