|
|
1.1 root 1: /* maskblt.h - header file for the maskblt demonstration program. */
2:
3:
4: /* function prototypes for the window procedures. */
5: LRESULT MainWndProc(HWND, UINT, WPARAM, LPARAM);
6: LRESULT DlgProc (HWND, UINT, WPARAM, LPARAM);
7:
8: VOID DrawGrids (HDC, int, int);
9:
10:
11: /* Top dialog item IDs */
12: #define DID_X 100
13: #define DID_Y 101
14: #define DID_WIDTH 102
15: #define DID_HEIGHT 103
16: #define DID_XSRC 104
17: #define DID_YSRC 105
18: #define DID_XMASK 106
19: #define DID_YMASK 107
20:
21: #define DID_ROP0 110
22: #define DID_ROP1 111
23: #define DID_ROP2 112
24:
25: #define DID_NEWSRC 300
26: #define DID_NEWMASK 301
27:
28: #define DID_DRAW 302
29:
30: #define DID_CB_MODE 150
31: #define DID_CB_PATTERN 151
32: #define DID_CB_ROPS 152
33:
34:
35:
36: /* accelerator IDs */
37: #define AID_PASTE 55
38: #define AID_COPY 56
39: #define AID_CYCLE 57
40:
41:
42:
43: /* Misc. defines for size, color, and appearance of drawing. */
44: #define GRIDCOLOR (COLORREF) 0x01000006
45: #define DIALOGHEIGHT 90
46: #define SEPARATORWIDTH 4
47: #define MAXCHARS 32
48: #define INC 5
49:
50:
51:
52: /* other user messages sent to the main window or the dialog */
53: #define WM_PUTUPDESTRECT WM_USER+20
54: #define WM_PUTUPSRCRECT WM_USER+21
55: #define WM_PUTUPMASKPT WM_USER+22
56: #define WM_MASKBLT WM_USER+23
57:
58:
59:
60: /* structure for the lookup tables. */
61: typedef struct tagLookupEntry{
62: int Value;
63: char String[30];
64: } LookupEntry;
65:
66:
67: #define NROPS 15
68: LookupEntry StandardROPs[NROPS] =
69: {{ 0x00CC0020, "SRCCOPY" },
70: { 0x00EE0086, "SRCPAINT" },
71: { 0x008800C6, "SRCAND" },
72: { 0x00660046, "SRCINVERT" },
73: { 0x00440328, "SRCERASE" },
74: { 0x00330008, "NOTSRCCOPY" },
75: { 0x001100A6, "NOTSRCERASE"},
76: { 0x00C000CA, "MERGECOPY" },
77: { 0x00BB0226, "MERGEPAINT" },
78: { 0x00F00021, "PATCOPY" },
79: { 0x00FB0A09, "PATPAINT" },
80: { 0x005A0049, "PATINVERT" },
81: { 0x00550009, "DSTINVERT" },
82: { 0x00000042, "BLACKNESS" },
83: { 0x00FF0062, "WHITENESS" }};
84:
85:
86: #define NPATTERNS 6
87: LookupEntry Patterns[NPATTERNS] =
88: {{ 0, "WHITE_BRUSH "},
89: { 1, "LTGRAY_BRUSH"},
90: { 2, "GRAY_BRUSH "},
91: { 3, "DKGRAY_BRUSH"},
92: { 4, "BLACK_BRUSH "},
93: { 5, "NULL_BRUSH "}};
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.