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

  1. //-----------------------------------------------------------------------------------//
  2. //              Windows Graphics Programming: Win32 GDI and DirectDraw               //
  3. //                             ISBN  0-13-086985-6                                   //
  4. //                                                                                   //
  5. //  Written            by  Yuan, Feng                             www.fengyuan.com   //
  6. //  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
  7. //  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
  8. //                                                                                   //
  9. //  FileName   : dcattr.h                                                             //
  10. //  Description: Device context data structure analysis, Chapter 3                   //
  11. //  Version    : 1.00.000, May 31, 2000                                              //
  12. //-----------------------------------------------------------------------------------//
  13.  
  14. typedef struct
  15. {
  16.     ULONG ul1;
  17.     ULONG ul2;
  18. }    FLOATOBJ;
  19.  
  20. typedef struct
  21. {
  22.     FLOATOBJ efM11;
  23.     FLOATOBJ efM12;
  24.     FLOATOBJ efM21;
  25.     FLOATOBJ efM22;
  26.     FLOATOBJ efDx;
  27.     FLOATOBJ efDy;
  28.     int         fxDx;
  29.     int         fxDy;
  30.     long     flAccel;
  31. }    MATRIX;
  32.  
  33.  
  34. // Windows NT 4.0: 0x190 bytes
  35. // Windows 2000  : 0x1C8 bytes
  36. typedef struct 
  37. {
  38.     void *        pvLDC;                    // 000
  39.     ULONG        ulDirty;
  40.     HBRUSH        hbrush;
  41.     HPEN        hpen;
  42.  
  43.     COLORREF    crBackgroundClr;        // 010
  44.     ULONG        ulBackgroundClr;
  45.     COLORREF    crForegroundClr;
  46.     ULONG        ulForegroundClr;
  47.  
  48. #if (_WIN32_WINNT >= 0x0500)
  49.     unsigned    f20[4];                    // 020
  50. #endif    
  51.  
  52.     int            iCS_CP;                    // 030
  53.     int            iGraphicsMode;
  54.     BYTE        jROP2;                    // 038
  55.     BYTE        jBkMode;
  56.     BYTE        jFillMode;
  57.     BYTE        jStretchBltMode;
  58.  
  59.     POINT        ptlCurrent;                // 03C
  60.     POINTFX        ptfxCurrent;            // 044
  61.     long        lBkMode;                // 04C
  62.  
  63.     long        lFillMode;                // 050
  64.     long        lStretchBltMode;
  65.  
  66. #if (_WIN32_WINNT >= 0x0500)
  67.     long        flFontMapper;            // 058
  68.     long        lIcmMode;
  69.     unsigned    hcmXform;                // 060
  70.     HCOLORSPACE hColorSpace;
  71.     unsigned    f68;
  72.     unsigned    IcmBrushColor;
  73.     unsigned    IcmPenColor;            // 070
  74.     unsigned    f74;
  75. #endif
  76.  
  77.     long        flTextAlign;            // 078
  78.     long        lTextAlign;
  79.     long        lTextExtra;                // 080
  80.     long        lRelAbs;
  81.     long        lBreakExtra;
  82.     long        cBreak;
  83.  
  84.     HFONT        hlfntNew;                // 090
  85.     MATRIX        mxWorldToDevice;        // 094
  86.     MATRIX        mxDeviceToWorld;        // 0D0
  87.     MATRIX        mxWorldToPage;            // 10C
  88.  
  89.     unsigned    f148[8];                // 148
  90.  
  91.     int            iMapMode;                // 168
  92.  
  93. #if (_WIN32_WINNT >= 0x0500)
  94.     DWORD        dwLayout;                // 16c
  95.     long        lWindowOrgx;            // 170
  96. #endif
  97.     
  98.     POINT        ptlWindowOrg;            // 174
  99.     SIZE        szlWindowExt;            // 17c
  100.     POINT        ptlViewportOrg;            // 184
  101.     SIZE        szlViewportExt;            // 18c
  102.  
  103.     long        flXform;                // 194
  104.     SIZE        szlVirtualDevicePixel;    // 198
  105.     SIZE        szlVirtualDeviceMm;        // 1a0
  106.     POINT        ptlBrushOrigin;            // 1a8
  107.  
  108.     unsigned    f1b0[2];                // 1b0    
  109.     RECT        VisRectRegion;            // 1b8
  110. }    DCAttr;
  111.  
  112.