#include "windows.h"

#define IDM_NEW                 2000
#define IDM_OPEN                2001
#define IDM_SAVE                2002
#define IDM_SAVEAS              2003
#define IDM_CLOSE               2004
#define IDM_EXIT                2005
#define IDM_ABOUT               2006
#define IDM_COPY                2010
#define IDM_PASTE               2011
#define IDM_UNDO                2012
#define IDM_SMALLBRUSH          2020
#define IDM_MEDIUMBRUSH         2021
#define IDM_LARGEBRUSH          2022

#define ID_ROPBASE              700
#define R2_BLACK	    1	/*  0	    */
#define R2_NOTMERGEPEN	    2	/* DPon	    */
#define R2_MASKNOTPEN	    3	/* DPna	    */
#define R2_NOTCOPYPEN	    4	/* PN	    */
#define R2_MASKPENNOT	    5	/* PDna	    */
#define R2_NOT		    6	/* Dn	    */
#define R2_XORPEN	    7	/* DPx	    */
#define R2_NOTMASKPEN	    8	/* DPan	    */
#define R2_MASKPEN	    9	/* DPa	    */
#define R2_NOTXORPEN	    10	/* DPxn     */
#define R2_NOP		    11	/* D	    */
#define R2_MERGENOTPEN	    12	/* DPno     */
#define R2_COPYPEN	    13	/* P	    */
#define R2_MERGEPENNOT	    14	/* PDno     */
#define R2_MERGEPEN	    15	/* DPo	    */
#define R2_WHITE	    16	/*  1	    */



IconEdit MENU
BEGIN
  POPUP "&File"
  BEGIN
    MENUITEM "&New",                   IDM_NEW
    MENUITEM "&Open...",               IDM_OPEN
    MENUITEM "&Save",                  IDM_SAVE
    MENUITEM "Save &As...",            IDM_SAVEAS
    MENUITEM "&Close",                 IDM_CLOSE
    MENUITEM SEPARATOR
    MENUITEM "E&xit",                  IDM_EXIT
    MENUITEM "&About IconEdit...",     IDM_ABOUT
  END

  POPUP "&Edit"
  BEGIN
    MENUITEM "&Undo",                  IDM_UNDO
    MENUITEM "&Copy",                  IDM_COPY
    MENUITEM "&Paste",                 IDM_PASTE
  END
END


AboutBox DIALOG 22, 17, 144, 75
STYLE WS_POPUP | WS_DLGFRAME
BEGIN
    CTEXT "IconEdit"	  -1,	    0,	5, 144,	 8
    CTEXT "by Marc Adler" -1,	    0, 34, 144,  8
    DEFPUSHBUTTON "OK"	  IDOK,	   53, 59,  32, 14,	 WS_GROUP
END

Pencil   ICON pencil.ico
Line     ICON line.ico
OpenRect ICON openrect.ico
FillRect ICON fillrect.ico
Circle   ICON circle.ico
FillCirc ICON fillcirc.ico
Net      ICON net.ico
FloodFill ICON floodfil.ico
IKE      ICON ike.ico




/*------------------------------------------------------------------------*/
#define ID_EDIT        100
#define ID_PATH        101
#define ID_LISTBOX     102
#define ID_DIRLISTBOX  103

OPEN DIALOG LOADONCALL MOVEABLE DISCARDABLE 85, 25, 147, 145
  CAPTION "Open Icon File"
  STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU | WS_POPUP
BEGIN
    CONTROL "File to open:", -1, "static", SS_LEFT | WS_CHILD, 3, 9, 71, 9
    CONTROL "", ID_EDIT, "edit", ES_LEFT | WS_BORDER | WS_TABSTOP | WS_CHILD, 71, 7, 63, 12

    CONTROL "Directory:", -1, "static", SS_LEFT | WS_CHILD, 3, 25, 38, 8
    CONTROL "directory name", ID_PATH, "static", SS_LEFT | WS_CHILD, 40, 25, 84, 8

    CONTROL "Icon Files:", -1, "static", SS_LEFT | WS_CHILD, 3, 42, 49, 8
    CONTROL "", ID_LISTBOX, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | WS_BORDER | WS_VSCROLL | WS_CHILD, 4, 55, 62, 57

    CONTROL "Directories:", -1, "static", SS_LEFT | WS_CHILD, 76, 42, 41, 8
    CONTROL "", ID_DIRLISTBOX, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | WS_BORDER | WS_VSCROLL | WS_CHILD, 75, 55, 46, 41

    CONTROL "OK", 1, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 4, 123, 36, 14
    CONTROL "Cancel", 2, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 54, 123, 36, 14
END


/*------------------------------------------------------------------------*/

SAVE DIALOG LOADONCALL MOVEABLE DISCARDABLE 85, 26, 147, 145
  CAPTION "Save Icon File"
  STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU | WS_POPUP
BEGIN
    CONTROL "Save file as:", -1, "static", SS_LEFT | WS_CHILD, 3, 9, 43, 9
    CONTROL "", ID_EDIT, "edit", ES_LEFT | WS_BORDER | WS_TABSTOP | WS_CHILD, 49, 7, 79, 12

    CONTROL "Directory:", -1, "static", SS_LEFT | WS_CHILD, 3, 25, 38, 8
    CONTROL "directory name", ID_PATH, "static", SS_LEFT | WS_CHILD, 40, 25, 84, 8

    CONTROL "Directories:", -1, "static", SS_LEFT | WS_CHILD, 3, 42, 41, 8
    CONTROL "", ID_DIRLISTBOX, "listbox", LBS_NOTIFY | LBS_SORT | LBS_STANDARD | WS_BORDER | WS_VSCROLL | WS_CHILD, 4, 56, 44, 41

    CONTROL "OK", 1, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 4, 123, 36, 14
    CONTROL "Cancel", 2, "button", BS_PUSHBUTTON | WS_TABSTOP | WS_CHILD, 54, 123, 36, 14
END



ABOUT DIALOG LOADONCALL MOVEABLE DISCARDABLE 43, 29, 224, 90
  CAPTION "About IKE"
  STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP
BEGIN
    CONTROL "IKE for Windows", 100, "static", SS_CENTER | WS_CHILD, 0, 6, 223, 8
    CONTROL "Written by Marc Adler/Magma Systems", 101, "static", SS_CENTER | WS_CHILD, 0, 20, 224, 8
    CONTROL "Copyright (C) 1991 Ziff Communications Co.", 102, "static", SS_CENTER | WS_CHILD, 0, 34, 224, 8
    CONTROL "IKE", 103, "static", SS_ICON | WS_CHILD, 6, 55, 16, 16
    CONTROL "&OK", 1, "button", BS_DEFPUSHBUTTON | WS_TABSTOP | WS_CHILD, 104, 69, 24, 14
END



