File:  [WindowsNT SDKs] / q_a / samples / printer / vars.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 18:29:19 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: ntsdk-jun-1992, HEAD
Microsoft Windows NT Build 297 06-28-1992

/******************************************************************************\
*
*  MODULE:      VARS.C
*
*  PURPOSE:     Contains global vars for PRINTER sample.
*
\******************************************************************************/

#include <windows.h>
#include "lookup.h"
#include "printer.h"
#include "paint.h"

#define BUFSIZE  64

/*  This table associates graphics menu id's with corresponding flags.
 *  The flags (eg. ARC, ELLIPSE) are #define'd in PAINT.C.
 */
LOOKUPENTRY dwGraphicsLkUpW[] = { { IDM_ARC,	     ARC	 },
				  { IDM_ELLIPSE,     ELLIPSE	 },
				  { IDM_LINETO,      LINETO	 },
				  { IDM_PIE,	     PIE	 },
				  { IDM_POLYBEZIER,  POLYBEZIER  },
				  { IDM_POLYGON,     POLYGON	 },
				  { IDM_POLYLINE,    POLYLINE	 },
				  { IDM_POLYPOLYGON, POLYPOLYGON },
				  { IDM_RECTANGLE,   RECTANGLE	 },
				  { IDM_ROUNDRECT,   ROUNDRECT	 },
				  { IDM_STRETCHBLT,  STRETCH_BLT },
				  { IDM_TEXTOUT,     TEXTOUT	 } };

/*  This table associates map mode menu id's with corresponding map
 *  modes. The map modes (eg. MM_ANISOTROPIC) are #define'd in WINGDI.H.
 */
LOOKUPENTRY iMapModesLkUpW[] =	{ { IDM_ANISOTROPIC, MM_ANISOTROPIC },
				  { IDM_HIENGLISH,   MM_HIENGLISH   },
				  { IDM_HIMETRIC,    MM_HIMETRIC    },
				  { IDM_ISOTROPIC,   MM_ISOTROPIC   },
				  { IDM_LOENGLISH,   MM_LOENGLISH   },
				  { IDM_LOMETRIC,    MM_LOMETRIC    },
				  { IDM_TEXT,	     MM_TEXT	    },
				  { IDM_TWIPS,	     MM_TWIPS	    } };

/*  DriverName, DeviceName, and Port are all strings representing the
 *  user's current choice of printer (or, alternately, the display).
 */
char     DriverName[BUFSIZE] = "";
char     DeviceName[BUFSIZE] = "";
char     Port[BUFSIZE]       = "";

HANDLE   hInst;             /* program instance handle                  */
DWORD    dwGraphicsOptions; /* flags interpreted in PAINT.C             */
HWND	 hWndMain;	    /* main application window handle		*/
HWND	 hWndToolbar;	    /* toolbar window handle			*/
int      iMapMode;          /* the current mapping mode for all devices */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.