home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 20.ddi / SAMPLES / SHOWGDI / DC.H_ / DC.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  1.8 KB  |  73 lines

  1. /****************************************************************************
  2.  DC.h
  3.  
  4.  The DC module handles setting and reading of the DC attributes.
  5.  
  6. ****************************************************************************/
  7.  
  8.  
  9. /****************************************************************************
  10.    Types
  11. ****************************************************************************/
  12.  
  13. /* Values needed to setup a DC */
  14. typedef struct {
  15.    short    mapMode;
  16.    POINT    windowOrg;
  17.    POINT    windowExt;
  18.    POINT    viewportOrg;
  19.    POINT    viewportExt;
  20.    
  21.    POINT    penPos;
  22.    POINT    brushOrg;
  23.  
  24.    BOOL     intersect;
  25.    RECT     rIntersect;
  26.    BOOL     exclude;
  27.    RECT     rExclude;
  28.  
  29.    DWORD    bkColor;
  30.    short    bkMode;
  31.  
  32.    LOGFONT  font;
  33.    WORD     textAlign;
  34.    short    breakExtra;
  35.    short    breakCount;
  36.    short    textExtra;
  37.    DWORD    textColor;
  38.  
  39.    short    rop2;
  40.    short    polyFillMode;
  41.    short    bltMode;
  42.  
  43.    LOGBRUSH brush;
  44.    BYTE     patChecks[64];   /* treated as array of boolean, TRUE => 0 bit */
  45.    LOGPEN   pen;
  46.  
  47.    /* synthesized fields */
  48.    HFONT    hFont;
  49.    HPEN     hPen;
  50.    HBRUSH   hBrush;
  51. } DCValues;
  52.  
  53.  
  54. /****************************************************************************
  55.    Globals
  56. ****************************************************************************/
  57.  
  58. /* The global DC settings */
  59. extern DCValues dcv;
  60.  
  61.  
  62. /****************************************************************************
  63.    Functions
  64. ****************************************************************************/
  65.  
  66. void DCCmd( int item );
  67. void ReadDC( HDC hdc );
  68. void SetupDC( HDC hdc );
  69. void SetupError( char *string );
  70. void CleanupDC( HDC hdc );
  71. void CheckDCMenuItems( HMENU hMenu );
  72.  
  73.