|
|
1.1 root 1: /*---------------------------------------------------------------------------*\
2: | GDIDEMO HEADER FILE
3: | This is the main header module for the application.
4: |
5: |
6: | created: 31-Oct-90
7: | history: 31-Oct-90 <chriswil> created.
8: |
9: \*---------------------------------------------------------------------------*/
10:
11: #ifdef WIN16
12: #define APIENTRY FAR PASCAL
13: typedef int (APIENTRY *WNDPROC)();
14: typedef WORD WPARAM;
15: typedef VOID *PVOID;
16: typedef WORD UINT;
17: #endif
18:
19:
20: #define APPCLASS "GDIDEMO"
21: #define APPTITLE "Windows GDI Demonstration"
22:
23:
24: #define APPMENU 1000
25: #define APPICON 1001
26: #define ABOUTBOX 1002
27:
28: #define IDM_DEMO_POLYBEZIER 100
29: #define IDM_DEMO_XFORM 101
30: #define IDM_DEMO_MAZE 102
31: #define IDM_DEMO_DRAW 103
32: #define IDM_DEMO_BOUNCE 104
33:
34: #define IDM_WINDOW_CASCADE 200
35: #define IDM_WINDOW_TILE 201
36: #define IDM_WINDOW_ICON 202
37: #define IDM_HELP_ABOUT 900
38:
39:
40: #define COLOR_SCALE_RED 1
41: #define COLOR_SCALE_GREEN 2
42: #define COLOR_SCALE_BLUE 3
43: #define COLOR_SCALE_GRAY 4
44:
45: #define CLIENTWND 0
46:
47:
48: /*
49: ** MAIN WINDOW ROUTINES (gdidemo.c)
50: */
51: LONG APIENTRY WndProc(HWND,UINT,WPARAM,LONG);
52: BOOL CreateProc(HWND);
53: VOID DestroyProc(HWND);
54: BOOL CommandProc(HWND,WPARAM,LONG);
55: VOID PaintProc(HWND);
56: DWORD FAR lRandom(VOID);
57:
58:
59: /*
60: ** INITIALIZATION ROUTINES (init.c)
61: */
62: BOOL FAR RegisterAppClass(HANDLE);
63: VOID FAR UnregisterAppClass(HANDLE);
64: HWND FAR CreateAppWindow(HANDLE);
65: HWND FAR CreateMDIClientWindow(HWND);
66:
67:
68:
69: /*
70: ** DIALOG ROUTINES (dialog.c)
71: */
72: BOOL APIENTRY AboutDlgProc(HWND,UINT,WPARAM,LONG);
73: int FAR DisplayDialogBox(HWND,LPSTR,WNDPROC,LONG);
74: VOID PaintWindow(HWND,int);
75: HPALETTE CreateColorScalePalette(HDC,int);
76:
77:
78: /*
79: ** WINDOW ROUTINES (wininfo.c)
80: */
81: BOOL FAR AllocWindowInfo(HWND,WORD);
82: PVOID FAR LockWindowInfo(HWND);
83: BOOL FAR UnlockWindowInfo(HWND);
84: BOOL FAR FreeWindowInfo(HWND);
85:
86:
87:
88:
89: #ifdef TESTDEBUG
90: #define DEBUGOUT(lpszString) OutputDebugString(lpszString)
91: #else
92: #define DEBUGOUT(lpszString) {}
93: #endif
94:
95:
96: /*
97: ** Porting macros...
98: */
99: #ifdef WIN32
100: #define GETINSTANCE(hWnd) (HANDLE)GetWindowLong(hWnd,GWL_HINSTANCE)
101: #define GETCLASSBRUSH(hWnd) (HBRUSH)GetClassLong(hWnd,GCL_HBRBACKGROUND)
102: #else
103: #define GETINSTANCE(hWnd) (HANDLE)GetWindowWord(hWnd,GWW_HINSTANCE)
104: #define GETCLASSBRUSH(hWnd) (HBRUSH)GetClassWord(hWnd,GCW_HBRBACKGROUND)
105: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.