#include <os2.h>
#define ES_ANY 0
#include "posys.H"

DLGTEMPLATE IDD_PURCHASE_ORDER
BEGIN
	DIALOG "Purchase Order", IDD_PURCHASE_ORDER, 6, 35, 249, 182, 0, FCF_TITLEBAR | FCF_SYSMENU | FCF_MINBUTTON | FCF_NOBYTEALIGN
	BEGIN
		CONTROL "P.O. #", 101, 37, 169, 45, 8, WC_STATIC, SS_TEXT | DT_CENTER | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Initials", 102, 170, 169, 45, 8, WC_STATIC, SS_TEXT | DT_CENTER | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Date", 103, 104, 169, 45, 8, WC_STATIC, SS_TEXT | DT_CENTER | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Item Desciptions", 104, 9, 142, 78, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Cost", 105, 166, 130, 23, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Qty.", 106, 170, 115, 19, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Total", 107, 165, 100, 24, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Comments", 108, 9, 78, 45, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Flags", 109, 9, 30, 45, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Sub Total", 120, 149, 73, 40, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Shipping", 122, 152, 61, 37, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Tax Rate", 110, 150, 49, 38, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Tax", 110, 163, 37, 25, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "1", DID_PONUM, 37, 158, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "01-01-95", DID_DATE, 104, 158, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "", DID_INITIALS, 170, 158, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "Sample", DID_DESCRIPTIONS, 9, 107, 133, 34, WC_LISTBOX, WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "~New Item", DID_NEWITEM, 8, 89, 43, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "~Delete Item", DID_DELETEITEM, 54, 89, 55, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "0.0", DID_COST, 196, 130, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "0", DID_QUANTITY, 196, 115, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "0.0", DID_ITEMTOTAL, 196, 100, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_READONLY | ES_ANY | WS_VISIBLE | WS_GROUP
		CONTROL "", DID_COMMENTS, 9, 43, 133, 33, WC_MLE, MLS_BORDER | MLS_WORDWRAP | MLS_VSCROLL | MLS_IGNORETAB | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "0.0", DID_SUBTOTAL, 196, 73, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_READONLY | ES_ANY | WS_VISIBLE | WS_GROUP
		CONTROL "0.0", DID_SHIPPING, 196, 61, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "0.0", DID_TAXRATE, 196, 49, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN |ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "0.0", DID_TAX, 196, 37, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN |ES_READONLY | ES_ANY | WS_VISIBLE | WS_GROUP |
		CONTROL "Total", 124, 166, 21, 23, 8, WC_STATIC, SS_TEXT | DT_RIGHT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "0.0", DID_TOTAL, 196, 21, 45, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_READONLY | ES_ANY | WS_VISIBLE | WS_GROUP
		CONTROL "Sample", DID_FLAGS, 9, 21, 133, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		PUSHBUTTON "OK", DID_OK, 4, 4, 51, 14
		PUSHBUTTON "Cancel", DID_CANCEL, 58, 4, 51, 14
		PUSHBUTTON "Help", 998, 112, 4, 51, 14, BS_HELP
		CONTROL "View Sheet", DID_SHEETVIEW, 171, 4, 73, 14, WC_BUTTON, BS_PUSHBUTTON | WS_VISIBLE | WS_GROUP | WS_TABSTOP
	END

END

MENU ID_MAINMENU
BEGIN
	SUBMENU "~File", MID_FILE
	BEGIN
		MENUITEM "~New...", MID_FILE_NEW
		MENUITEM "~Open...", MID_FILE_OPEN
		MENUITEM SEPARATOR
		MENUITEM "~Save...", MID_FILE_SAVE
		MENUITEM "Save ~as...", MID_FILE_SAVEAS
		MENUITEM SEPARATOR
		MENUITEM "~Print...", MID_FILE_PRINT
		MENUITEM SEPARATOR
		MENUITEM "~Exit...", MID_FILE_EXIT
	END

	SUBMENU "~Edit", 200
	BEGIN
		MENUITEM "~Undo\aAlt+Backspace", 201
		MENUITEM "~Redo\aShift+Alt+Backspace", 202
		MENUITEM SEPARATOR
		MENUITEM "Cu~t\aShift+Del", 203
		MENUITEM "~Copy\aCtrl+Ins", 204
		MENUITEM "~Paste\aShift+Ins", 205
		MENUITEM "Cl~ear\aDel", 206
		MENUITEM "~Duplicate", 207
		MENUITEM SEPARATOR
		MENUITEM "~Select all", 208
	END

	SUBMENU "~Help", 300
	BEGIN
		MENUITEM "Help ~index...", 301
		MENUITEM "~General help...", 302
		MENUITEM "~Using help...", 303
		MENUITEM "~Keys help...", 304
		MENUITEM SEPARATOR
		MENUITEM "~Product information...", 305
	END

END

ACCELTABLE ID_MAINACCEL
BEGIN
	VK_F4, MID_FILE_EXIT, VIRTUALKEY,ALT
END


DLGTEMPLATE IDD_NEWITEM
BEGIN
	DIALOG "New Item", IDD_NEWITEM, 6, 59, 170, 64, WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
	BEGIN
		CONTROL "Description", DID_DESCRIPTIONS, 8, 40, 155, 10, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "Description", 101, 8, 52, 45, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Quantity", 102, 8, 26, 38, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "Cost", 103, 102, 26, 22, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
		CONTROL "1", DID_QUANTITY, 48, 25, 36, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "$1.00", DID_COST, 127, 25, 36, 9, WC_ENTRYFIELD, ES_LEFT | ES_AUTOSCROLL | ES_MARGIN | ES_ANY | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		DEFPUSHBUTTON "OK", DID_OK, 6, 4, 51, 14
		PUSHBUTTON "Cancel", DID_CANCEL, 60, 4, 51, 14
		PUSHBUTTON "Help", 998, 114, 4, 51, 14, BS_HELP
	END

END

POINTER ID_MAINICON "po.ico"
POINTER IDD_PURCHASE_ORDER  "po.ico"

DLGTEMPLATE IDD_VIEWSHEET
BEGIN
	DIALOG "Internal Sheet", IDD_VIEWSHEET, 11, 40, 250, 100, WS_VISIBLE, FCF_SYSMENU | FCF_TITLEBAR
	BEGIN
		DEFPUSHBUTTON "OK", DID_OK, 6, 3, 51, 14
		CONTROL "Sample", DID_SHEETVIEW, 7, 22, 236, 61, WC_STATIC, SS_FGNDFRAME | WS_VISIBLE | WS_GROUP
		CONTROL "In Cell Edit", DID_INCELL, 123, 4, 66, 10, WC_BUTTON, BS_AUTOCHECKBOX | WS_VISIBLE | WS_GROUP | WS_TABSTOP
		CONTROL "Sample", DID_FORMULA, 7, 87, 236, 8, WC_STATIC, SS_TEXT | DT_LEFT | DT_TOP | DT_MNEMONIC | WS_VISIBLE | WS_GROUP
	END

END

