Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

97 lines
2.6 KiB

/******************************************************************************\
* This is a part of the Microsoft Source Code Samples.
* Copyright (C) 1993 Microsoft Corporation.
* All rights reserved.
* This source code is only intended as a supplement to
* Microsoft Development Tools and/or WinHelp documentation.
* See these sources for detailed information regarding the
* Microsoft samples programs.
\******************************************************************************/
#ifdef WIN16
#define APIENTRY FAR PASCAL
typedef WORD WPARAM;
//#else
//typedef DWORD WPARAM;
#endif
/* defintions */
#define POLYCLASS "POLYDEMO"
#define POLYTITLE "PolyBezier Demo"
#define APPICON "PolyBezier"
#define APPNAME "PolyBezier"
#define APPTITLE "PolyBezier"
/* licensing definitions */
#define APPLICNAME "polybezier"
#define APPPRODUCER "polycentral_inc"
#define APPVERSION "1.0"
#define APPLICERRMSG " - License Error"
#define APPNOLICENSE "Unable to obtain run time license!"
#define APPNOLICRELEASE "Unable to release run time license!"
#define MAX_BEZIER 80
#define VELMAX 10
#define VELMIN 2
#define BEZ_CURVES 1 //Number of Curves in the Bezier
#define BEZ_PTS 3*BEZ_CURVES+1 //Number of Points is the #Curves * 3 + 1
/*
** This structue defines a basic bezier curve. It is intended to be used in
** an array of beziers.
*/
typedef struct _BEZBUFFER
{
POINT pPts[BEZ_PTS];
} BEZBUFFER;
typedef BEZBUFFER *PBEZBUFFER;
typedef BEZBUFFER NEAR *NPBEZBUFFER;
typedef BEZBUFFER FAR *LPBEZBUFFER;
/*
** This is the main object for the polybezier window. This structure defines
** a series of bezier curves and the distance between each curve.
*/
typedef struct _POLYDATA
{
int nBezTotal;
int nBezCurr;
int nColor;
POINT pVel[BEZ_PTS];
HANDLE hBezBuffer;
} POLYDATA;
typedef POLYDATA *PPOLYDATA;
typedef POLYDATA NEAR *NPPOLYDATA;
typedef POLYDATA FAR *LPPOLYDATA;
/*
** POLYBEZIER WINDOW ROUTINES (poly.c)
*/
HWND FAR CreatePolyWindow(HWND,int);
LONG APIENTRY PolyProc(HWND,UINT,WPARAM,LONG);
BOOL PolyCreateProc(HWND);
VOID PolyDestroyProc(HWND);
BOOL PolyCommandProc(HWND,WPARAM,LONG);
VOID PolyPaintProc(HWND);
VOID PolyRedraw(HWND);
int PolyNewVel(int);
VOID PolyInitPoints(HWND);
VOID PolyDrawBez(HWND);
/*
** WININFO ROUTINES <wininfo.c>
*/
BOOL FAR AllocWindowInfo(HWND hWnd, WORD wSize);
PVOID FAR LockWindowInfo(HWND hWnd);
BOOL FAR UnlockWindowInfo(HWND hWnd);
BOOL FAR FreeWindowInfo(HWND hWnd);