|
|
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: \******************************************************************************/ ! 11: 1.1 root 12: 13: #ifdef WIN16 14: #define APIENTRY FAR PASCAL 15: typedef WORD WPARAM; 16: //#else 17: //typedef DWORD WPARAM; 18: #endif 19: 20: 21: #define POLYCLASS "POLYDEMO" 22: #define POLYTITLE "PolyBezier Demo" 23: 24: #define MAX_BEZIER 80 25: #define VELMAX 10 26: #define VELMIN 2 1.1.1.2 root 27: #define BEZ_CURVES 1 //Number of Curves in the Bezier 28: #define BEZ_PTS 3*BEZ_CURVES+1 //Number of Points is the #Curves * 3 + 1 1.1 root 29: 30: 31: /* 32: ** This structue defines a basic bezier curve. It is intended to be used in 33: ** an array of beziers. 34: */ 35: typedef struct _BEZBUFFER 36: { 1.1.1.2 root 37: POINT pPts[BEZ_PTS]; 1.1 root 38: } BEZBUFFER; 39: typedef BEZBUFFER *PBEZBUFFER; 40: typedef BEZBUFFER NEAR *NPBEZBUFFER; 41: typedef BEZBUFFER FAR *LPBEZBUFFER; 42: 43: 44: /* 45: ** This is the main object for the polybezier window. This structure defines 46: ** a series of bezier curves and the distance between each curve. 47: */ 48: typedef struct _POLYDATA 49: { 50: int nBezTotal; 51: int nBezCurr; 52: int nColor; 1.1.1.2 root 53: POINT pVel[BEZ_PTS]; 1.1 root 54: HANDLE hBezBuffer; 55: } POLYDATA; 56: typedef POLYDATA *PPOLYDATA; 57: typedef POLYDATA NEAR *NPPOLYDATA; 58: typedef POLYDATA FAR *LPPOLYDATA; 59: 60: 61: /* 62: ** POLYBEZIER WINDOW ROUTINES (poly.c) 63: */ 64: HWND FAR CreatePolyWindow(HWND,int); 65: LONG APIENTRY PolyProc(HWND,UINT,WPARAM,LONG); 66: BOOL PolyCreateProc(HWND); 67: VOID PolyDestroyProc(HWND); 68: BOOL PolyCommandProc(HWND,WPARAM,LONG); 69: VOID PolyPaintProc(HWND); 70: 71: 72: VOID PolyRedraw(HWND); 73: int PolyNewVel(int); 74: VOID PolyInitPoints(HWND); 75: VOID PolyDrawBez(HWND);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.