Annotation of q_a/samples/regions/regions.h, revision 1.1.1.2

1.1.1.2 ! root        1: /******************************************************************************\
1.1       root        2: *
1.1.1.2 ! root        3: *                                    REGIONS.H
1.1       root        4: *
1.1.1.2 ! root        5: \******************************************************************************/
1.1       root        6: 
                      7: 
                      8: 
1.1.1.2 ! root        9: /******************************************************************************\
        !            10: *                                SYMBOLIC CONSTANTS
        !            11: \******************************************************************************/
1.1       root       12: 
1.1.1.2 ! root       13: #define IDM_ERASE           101    // menuitems
        !            14: #define IDM_OFFSETRGN       102
        !            15: #define IDM_INVERTRGN       103
        !            16: #define IDM_FRAMERGN      104
        !            17: #define IDM_PTINRGN         105
        !            18: #define IDM_RECTINRGN       106
        !            19: #define IDM_SETRECTRGN      107
        !            20: #define IDM_GETRGNBOX       108
        !            21: #define IDM_ABOUT           109
1.1       root       22: 
1.1.1.2 ! root       23: #define IDM_ELLIPSE         201
        !            24: #define IDM_POLYPOLYGON     202
        !            25: #define IDM_RECT            203
1.1       root       26: 
1.1.1.2 ! root       27: #define IDM_AND             301
        !            28: #define IDM_COPY            302
        !            29: #define IDM_DIFF            303
        !            30: #define IDM_OR              304
        !            31: #define IDM_XOR             305
1.1       root       32: 
1.1.1.2 ! root       33: #define ELLIPTIC_RGN        0X0001 // flags used in RGNSTRUCT.flags
        !            34: #define POLYPOLYGON_RGN     0X0002
        !            35: #define RECT_RGN            0X0004
1.1       root       36: 
1.1.1.2 ! root       37: #define MAXRGNSTRUCTS       3      // max # of rgns existing at 1 time
1.1       root       38: 
1.1.1.2 ! root       39: #define POLYPOLYGONCOUNT    3      // # of polygons in call to
        !            40:                                    //   CreatePolyPolygonRgn
1.1       root       41: 
1.1.1.2 ! root       42: #define TRECT_NEW           1      // TrackRect() actions
        !            43: #define TRECT_DELETE        2
        !            44: #define TRECT_PAINT         3
1.1       root       45: 
1.1.1.2 ! root       46: #define  RESET_ALL          0      // Reset() actions
1.1       root       47: #define  ENABLE_OPTIONS     1
                     48: #define  ENABLE_COMBINERGN  2
                     49: #define  DISABLE_COMBINERGN 3
                     50: 
                     51: 
                     52: 
1.1.1.2 ! root       53: /******************************************************************************\
        !            54: *                                    TYPEDEFS
        !            55: \******************************************************************************/
1.1       root       56: 
1.1.1.2 ! root       57: typedef struct
        !            58: {
1.1       root       59:   HRGN hrgn;
                     60:   WORD type;
                     61: } RGNSTRUCT;
                     62: 
                     63: 
1.1.1.2 ! root       64: typedef struct
        !            65: {
1.1       root       66:     WORD   xOrigin, yOrigin;
                     67:     RECT   trackRect, clientRect;
                     68:     HDC    hdc;
                     69: } TRACKRECTSTRUCT, *PTRACKRECTSTRUCT;
                     70: 
                     71: 
                     72: 
1.1.1.2 ! root       73: /******************************************************************************\
        !            74: *                                GLOBAL VARIABLES
        !            75: \******************************************************************************/
1.1       root       76: 
                     77: HANDLE    hInst;
                     78: RGNSTRUCT rgnArray[MAXRGNSTRUCTS];
                     79: int       currRgn;
                     80: HMENU     hMenu;
                     81: 
                     82: RECT      ellipseRect = {40,  40, 180, 160};
                     83: POINT     polyPolygonPoints[] = {{120, 20}, {200, 20}, {200, 80},
                     84:                                                        { 80,140},
                     85:                                  { 20, 20}, { 80, 20}, { 20, 80},
                     86:                                  {200,120}, {200,200}, {160,200}};
                     87: 
                     88: int       polyPolygonCounts[] = {4,3,3};
                     89: RECT      rectRect    = {20, 100, 120, 200};
                     90: 
                     91: 
                     92: 
1.1.1.2 ! root       93: /******************************************************************************\
        !            94: *                               FUNCTION PROTOTYPES
        !            95: \******************************************************************************/
        !            96: 
        !            97: LRESULT CALLBACK MainWndProc   (HWND, UINT, WPARAM, LPARAM);
        !            98: LRESULT CALLBACK AboutDlgProc  (HWND, UINT, WPARAM, LPARAM);
        !            99: LRESULT CALLBACK RgnBoxDlgProc (HWND, UINT, WPARAM, LPARAM);
        !           100: 
        !           101: VOID             MyCreateRgn   (WORD);
        !           102: VOID             MyCombineRgn  (int);
1.1       root      103: PTRACKRECTSTRUCT TrackRect     (PTRACKRECTSTRUCT, int, HWND, LONG);
1.1.1.2 ! root      104: VOID             Reset         (WORD);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.