
//-----------------------------------------------------------------------------
// 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.
//-----------------------------------------------------------------------------


#include <windows.h>
#include <winspool.h>
#include "printer.h"
#include "common.h"

printer   BITMAP printer.bmp

MAIN_ICON ICON   printer.ico

Menu MENU
{
  POPUP         "&Options"
  {
     MENUITEM   "&Print (via GetDC)"       IDM_PRINT
     MENUITEM   "Print&Dlg..."             IDM_PRINTDLG
     MENUITEM   "&GetDeviceCaps..."        IDM_GETDEVICECAPS
     MENUITEM   "&EnumPrinters..."         IDM_ENUMPRINTERS
     MENUITEM   "Ge&tPrinterDriver..."     IDM_GETPRINTERDRIVER
     MENUITEM   "EnumPrinterDriver&s..."   IDM_ENUMPRINTERDRIVERS
     MENUITEM   "&Refresh"                 IDM_REFRESH
     MENUITEM   SEPARATOR
     MENUITEM   "&About...",               IDM_ABOUT
  }
  POPUP         "&Mapping Modes"
  {
    MENUITEM    "MM_&HIENGLISH"            IDM_HIENGLISH
    MENUITEM    "MM_HI&METRIC"             IDM_HIMETRIC
    MENUITEM    "MM_&LOENGLISH"            IDM_LOENGLISH
    MENUITEM    "MM_L&OMETRIC"             IDM_LOMETRIC
    MENUITEM    "MM_T&WIPS"                IDM_TWIPS
    MENUITEM    SEPARATOR
    MENUITEM    "MM_&ISOTROPIC"            IDM_ISOTROPIC
    MENUITEM    "MM_&ANISOTROPIC"          IDM_ANISOTROPIC
    MENUITEM    SEPARATOR
    MENUITEM    "MM_&TEXT"                 IDM_TEXT, CHECKED
  }
  POPUP         "&Graphics"
  {
    MENUITEM    "A&rc()"                   IDM_ARC
    MENUITEM    "E&llipse()"               IDM_ELLIPSE
    MENUITEM    "LineT&o()"                IDM_LINETO
    MENUITEM    "P&ie()"                   IDM_PIE
    MENUITEM    "PlgBl&t()"                IDM_PLGBLT
    MENUITEM    "Poly&Bezier()"            IDM_POLYBEZIER
    MENUITEM    "Poly&gon()"               IDM_POLYGON
    MENUITEM    "Pol&yLine()"              IDM_POLYLINE
    MENUITEM    "&PolyPolygon()"           IDM_POLYPOLYGON
    MENUITEM    "Re&ctangle()"             IDM_RECTANGLE
    MENUITEM    "Ro&undRect()"             IDM_ROUNDRECT
    MENUITEM    "&StrectBlt()"             IDM_STRETCHBLT
    MENUITEM    "&All"                     IDM_ALLGRAPHICS
    MENUITEM    "&None"                    IDM_NOGRAPHICS
    MENUITEM    SEPARATOR
    MENUITEM    "&EnumFonts()"             IDM_ENUMFONTS
    MENUITEM    SEPARATOR
    MENUITEM    "&Draw axis"               IDM_DRAWAXIS, CHECKED
  }
  POPUP         "&Pen"
  {
    MENUITEM    "&Color..."                IDM_SETPENCOLOR

    POPUP       "&Width"
    {
      MENUITEM  "&1"                       IDM_PENWIDTH_1, CHECKED
      MENUITEM  "&2"                       IDM_PENWIDTH_2
      MENUITEM  "&3"                       IDM_PENWIDTH_3
      MENUITEM  "&4"                       IDM_PENWIDTH_4
      MENUITEM  "&5"                       IDM_PENWIDTH_5
      MENUITEM  "&6"                       IDM_PENWIDTH_6
      MENUITEM  "&7"                       IDM_PENWIDTH_7
      MENUITEM  "&8"                       IDM_PENWIDTH_8
    }
    POPUP       "&Style"
    {
      MENUITEM  "PS_&SOLID"                IDM_PENCOLOR_SOLID, CHECKED
      MENUITEM  "PS_&DASH"                 IDM_PENCOLOR_DASH
      MENUITEM  "PS_D&OT"                  IDM_PENCOLOR_DOT
      MENUITEM  "PS_D&ASHDOT"              IDM_PENCOLOR_DASHDOT
      MENUITEM  "PS_DASHDO&TDOT"           IDM_PENCOLOR_DASHDOTDOT
      MENUITEM  "PS_&NULL"                 IDM_PENCOLOR_NULL
      MENUITEM  "PS_&INSIDEFRAME"          IDM_PENCOLOR_INSIDEFRAME
    }
  }
  POPUP         "&Brush"
  {
    MENUITEM    "&Color..."                IDM_SETBRUSHCOLOR

    POPUP       "&Style"
    {
      MENUITEM  "HS_&HORIZONTAL"           IDM_BRUSHSTYLE_HORIZONTAL
      MENUITEM  "HS_&VERTICAL"             IDM_BRUSHSTYLE_VERTICAL
      MENUITEM  "HS_&FDIAGONAL"            IDM_BRUSHSTYLE_FDIAGONAL
      MENUITEM  "HS_&BDIAGONAL"            IDM_BRUSHSTYLE_BDIAGONAL
      MENUITEM  "HS_&CROSS"                IDM_BRUSHSTYLE_CROSS
      MENUITEM  "HS_&DIAGCROSS"            IDM_BRUSHSTYLE_DIAGCROSS
    }
  }
  MENUITEM      "&Text color..."           IDM_TEXTCOLOR
}


About DIALOG 30, 14, 136, 90
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About Printer"
FONT 8, "MS Sans Serif"
BEGIN
    ICON            MAIN_ICON, 101, 8, 22, 18, 20
    CTEXT           "Microsoft Developer Support", 104, 0, 63, 136, 8
    CTEXT           "Copyright \251 1992-1993 Microsoft Corporation", 105, 0, 74,
                    136, 8
    LTEXT           "Printer Win32 SDK sample ", 103, 40, 25, 95, 8
    LTEXT           "version 1.0", 106, 40, 35, 95, 8
    DEFPUSHBUTTON   "OK", IDOK, 95, 6, 40, 14
    CONTROL         "", 108, "Static", SS_BLACKRECT, 0, 53, 136, 2
END


List DIALOG 40, 30, 260, 193
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
BEGIN
    LISTBOX         DID_LISTBOX, 6, 7, 248, 160,
                    LBS_SORT | WS_VSCROLL | WS_TABSTOP | LBS_USETABSTOPS
    PUSHBUTTON      "OK", DID_OK, 6, 174, 40, 14
END


Abort DIALOG 66, 41, 160, 80
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
BEGIN
    LTEXT           "Printing in progress...", 101, 40, 20, 80, 8
    PUSHBUTTON      "Cancel print job", DID_CANCEL, 41, 50, 78, 14
END


EnumPrtOpt DIALOG 191, 100, 147, 151
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "EnumPrinters options:"
FONT 8, "MS Sans Serif"
BEGIN
    AUTOCHECKBOX    "PRINTER_ENUM_DEFAULT", PRINTER_ENUM_DEFAULT, 20, 10, 120, 10
    AUTOCHECKBOX    "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL, 20, 26, 121, 10
    AUTOCHECKBOX    "PRINTER_ENUM_FAVORITE", PRINTER_ENUM_FAVORITE, 20, 42, 118, 10
    AUTOCHECKBOX    "PRINTER_ENUM_NAME", PRINTER_ENUM_NAME, 20, 58, 120, 10
    AUTOCHECKBOX    "PRINTER_ENUM_REMOTE", PRINTER_ENUM_REMOTE, 20, 90, 122, 10
    AUTOCHECKBOX    "PRINTER_ENUM_SHARED", PRINTER_ENUM_SHARED, 20, 106, 113, 10
    DEFPUSHBUTTON   "OK", DID_OK,  20, 128, 40, 14
    PUSHBUTTON      "Cancel", DID_CANCEL, 94, 128, 40, 14
    EDITTEXT        DID_EDITTEXT, 32, 73, 102, 12, ES_AUTOHSCROLL | WS_DISABLED
END
