File:  [OS/2 SDKs] / os232sdk / toolkt20 / c / samples / vmm / vmm_main.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:26:30 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1990, HEAD
Microsoft OS/2 SDK 2.0 05-30-1990

/*==============================================================*\
 *								*
 *  Vmm_main.h - Sample PM application header file		*
 *	Created 1990, Microsoft, IBM Corp.        	      		*
 *								*
 *--------------------------------------------------------------*
 *								*
 *  This header file contains the application wide constants	*
 *  and structure definitions.					*
 *								*
\*==============================================================*/

#define IDR_SAMPLE	 8	/* resource identifier */

/*--------------------------------------------------------------*\
 *  Menu item ids						*
\*--------------------------------------------------------------*/
#define IDM_FILE			    1000
#define IDM_FILENEW			    1100
#define IDM_FILEOPEN			    1200
#define IDM_FILESAVE			    1300
#define IDM_FILESAVEAS			    1400
#define IDM_FILEPRINT			    1500
#define IDM_FILEPAGESETUP		    1600
#define IDM_FILEPRINTSETUP		    1700
#define IDM_FILEEXIT			    1800

#define IDM_EDIT			    2000
#define IDM_EDITUNDO			    2100
#define IDM_EDITCUT			    2200
#define IDM_EDITCOPY			    2300
#define IDM_EDITPASTE			    2400
#define IDM_EDITCLEAR			    2500

#define IDM_VIEW			    3000
#define IDM_VIEWSTRING			    3100

#if 0  /* should these be ripped out ???????????????????????????  -johnba */

#define IDM_OPTIONS			    4000
#define IDM_OPTIONSFORECOLOR		    4100
#define IDM_OPTIONSBACKCOLOR		    4200
#define IDM_OPTIONSBACKCOLORYELLOW	    4210
#define IDM_OPTIONSBACKCOLORPINK	    4220
#define IDM_OPTIONSBACKCOLORCYAN	    4230
#define IDM_OPTIONSBACKCOLORDEFAULT	    4240
#define IDM_OPTIONSFONT 		    4300

#define IDM_DEMO			    5000
#define IDM_DEMODLG			    5100
#define IDM_DEMODLGBUTTONS		    5110
#define IDM_DEMODLGLISTBOXES		    5120
#define IDM_DEMODLGCOMBOBOXES		    5130
#define IDM_DEMODLGENTRYFIELDS		    5140
#define IDM_DEMODLGSTATIC		    5150
#define IDM_DEMODLGPP			    5160

#define IDM_DEMOMSGBOX			    5200
#define IDM_DEMOMSGBOXOK		    5210
#define IDM_DEMOMSGBOXOKCANCEL		    5220
#define IDM_DEMOMSGBOXYESNO		    5230
#define IDM_DEMOMSGBOXYESNOCANCEL	    5240
#define IDM_DEMOMSGBOXRETRYCANCEL	    5250
#define IDM_DEMOMSGBOXABORT		    5260
#define IDM_DEMOMSGBOXENTER		    5270
#define IDM_DEMOMSGBOXENTERCANCEL	    5280
#define IDM_DEMOMSGBOXQUERY		    5290
#define IDM_DEMOMSGBOXWARNING		    5300
#define IDM_DEMOMSGBOXINFO		    5310
#define IDM_DEMOMSGBOXCRITICAL		    5320
#define IDM_DEMOMSGBOXAPP		    5330
#define IDM_DEMOMSGBOXSYS		    5340
#define IDM_DEMOMSGBOXMOVEABLE		    5350
#define IDM_DEMOMSGBOXHELP		    5400

#define IDM_WINDOW			    6000
#define IDM_WINDOWTILE			    6100
#define IDM_WINDOWCASCADE		    6200

#endif /* ?????????????????????????????????????????????????? */

#define IDM_VMM 			    7000
#define IDM_VMMALLOC			    7100
#define IDM_VMMFREE			    7200
#define IDM_VMMSET			    7300
#define IDM_VMMWRITE			    7400
#define IDM_VMMREAD                         7500

#define IDM_HELP			    9000
#define IDM_HELPHELPFORHELP		    9100
#define IDM_HELPEXTENDED		    9200
#define IDM_HELPKEYS			    9300
#define IDM_HELPINDEX			    9400
#define IDM_HELPTUTORIAL		    9500
#define IDM_HELPABOUT			    9600

/*--------------------------------------------------------------*\
 *  Dialog item ids						*
\*--------------------------------------------------------------*/
#define ID_OK		    1
#define ID_CANCEL	    2

/*--------------------------------------------------------------*\
 *  Stringtable ids						*
\*--------------------------------------------------------------*/
#define IDS_FILEOPENEXT 	    1
#define IDS_APPNAME		    2
#define IDS_HELPLIBRARYNAME	    3

/*--------------------------------------------------------------*\
 *  Messagetable ids						*
\*--------------------------------------------------------------*/
#define IDMSG_INITFAILED		1
#define IDMSG_MAINWINCREATEFAILED	2
#define IDMSG_CANNOTOPENINPUTFILE	3
#define IDMSG_CANNOTRUNPAGESETUP	4
#define IDMSG_CANNOTRUNPRINTSETUP	5
#define IDMSG_CANNOTRUNPRINT		6
#define IDMSG_CANNOTRUNCOLOR		7
#define IDMSG_CANNOTGETHPS		8
#define IDMSG_HELPLOADERROR		9
#define IDMSG_CANNOTLOADSTRING	       10
#define IDMSG_CANNOTOPENPRINTER        11

/*--------------------------------------------------------------*\
 *  Error Constants						*
\*--------------------------------------------------------------*/

#define VMERR_MAX_ALLOCATED		0xFF10
#define VMERR_ZERO_ALLOCATED		0xFF11
#define VMERR_TILE_ONLY 		0xFF12
#define VMERR_COMMIT_AND_TILE_ONLY	0xFF13
#define VMERR_ALREADY_FREED		0xFF20
#define VMERR_NOT_BASEPAGE		0xFF21
#define VMERR_DECOMMIT_RESERVED 	0xFF30
#define VMERR_ACCESS_AND_DECOMMIT	0xFF31
#define VMERR_ACCESS_ON_RESERVED	0xFF32
#define VMERR_COMMIT_ON_COMMITTED	0xFF33
#define VMERR_COMMIT_ONLY		0xFF34
#define VMERR_SET_NO_PARMS		0xFF35
#define VMERR_SET_ZERO_SIZE		0xFF36
#define VMERR_SET_ON_FREE		0xFF37
#define VMERR_DEFAULT			0xFFFF
/*--------------------------------------------------------------*\
 *  Other constants						*
\*--------------------------------------------------------------*/
#define MAXTEXTLEN	40    /* maximum text length for window */
#define MESSAGELEN	25    /* maximum length for messages */
#define MAXAPPNAMELEN	15
#define MAXPAGES	10
#define PAGESIZE      4096

#define BUFF_SIZE      200    /* size of string buffers for various stuff */

/*--------------------------------------------------------------*\
 *  Data structures and typedefs				*
\*--------------------------------------------------------------*/

struct _WINDOWDATA  {
    LONG clrFore;
    LONG clrBack;
    UCHAR *szText[MAXTEXTLEN + 1];
};

typedef struct _OBJSTRUCT{
    ULONG ulSize;
    ULONG ulAttr;
    PVOID pvAddress;
    } OBJSTRUCT;

typedef OBJSTRUCT FAR * POBJSTRUCT;

typedef struct _WINDOWDATA WINDOWDATA;
/* hungarian notation: wdata */
typedef WINDOWDATA * PWINDOWDATA;

typedef struct _PAGEENTRY {
    PVOID   pvAddress;
    BOOL    fBaseAddr;
    } PAGEENTRY;
/* hungarian notation: pgentry */

typedef struct _MSGENTRY {
    ULONG   ulMsgNum;
    char    szMsgText[BUFF_SIZE];
    USHORT  usMsgIcon;
    } MSGENTRY;
/* hungarian notation: msgentry */

/******************************************************
 *
 * Cruiser version define
 *
 ******************************************************/
#define     VER630

unix.superglobalmegacorp.com

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