|
|
1.1.1.3 ! root 1: ! 2: /******************************************************************************\ ! 3: * This is a part of the Microsoft Source Code Samples. ! 4: * Copyright (C) 1993 Microsoft Corporation. ! 5: * All rights reserved. ! 6: * This source code is only intended as a supplement to ! 7: * Microsoft Development Tools and/or WinHelp documentation. ! 8: * See these sources for detailed information regarding the ! 9: * Microsoft samples programs. ! 10: \******************************************************************************/ 1.1 root 11: 12: #ifdef WIN16 13: #define APIENTRY FAR PASCAL 14: typedef int (APIENTRY *WNDPROC)(); 15: typedef WORD WPARAM; 16: typedef VOID *PVOID; 17: typedef WORD UINT; 18: #endif 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: */ 1.1.1.3 ! root 99: #if defined(_WIN32) || defined(WIN32) 1.1 root 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.