/*---------------------------------------------------------
	HEX.H  File Hex Dump Header file
  ---------------------------------------------------------*/



#define IDM_ABOUT		100
#define IDM_OPEN		101
#define IDM_EXIT		102
#define IDM_CLOSE		103
#define IDM_HELP		104


#define IDC_FILENAME	400
#define IDC_EDIT		401
#define IDC_FILES		402
#define IDC_PATH		403
#define IDC_LISTBOX 	404

#define FOURKBYTE		4096
#define MAXINT			32767
#define YES 			1
#define NO				0


char	FileName[128] ;
char	PathName[128] ;
char	OpenName[128] ;
char	DefPath[128] ;
char	DefSpec[13] = "*.*" ;
char	DefExt[] = ".txt" ;
char	str[255] ;


HANDLE		hInst,	hFileBuf ;
HMENU		hHexMenu ;
HANDLE		hHourGlass ;
HANDLE		hSaveCursor ;
OFSTRUCT	OFStruct ;
struct		stat	FileStatus ;

int 		count, nWinLines, nWinFirstLine, nBufLines ;
int 		hFile ;
int 		nNumOfLines, strLength ;

short		nCharWidth, nCharHeight, nClientWidth,
			nClientHeight, nVSBarPos, nVSBarMax,
			nHSBarPos, nHSBarMax ;

LONG		lFileOffset, lTotalFileLines, lFileLine ;
PSTR		pFileBuf ;
char		printStr[80] ;
BOOL		endOfFile ;
char		formatString[] = {"%.8lX   %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X %.2X   %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"} ;

LPSTR		lpHexTitle ;



int PASCAL					WinMain (HANDLE, HANDLE, LPSTR, int) ;
long FAR PASCAL 			WndProc (HWND, unsigned, WORD, LONG) ;
BOOL FAR PASCAL 			WinAboutProc (HWND, unsigned, WORD, LONG) ;
HANDLE FAR PASCAL			OpenDlg (HWND, unsigned, WORD, LONG) ;
