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