home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
wpj_mag
/
wpjv1n6.zip
/
EDITPRO.ZIP
/
FILEROUT.C
< prev
Wrap
C/C++ Source or Header
|
1993-04-30
|
2KB
|
85 lines
// EditPro Text Editor Copyright (c) 1993 Eric Grass
// "filerout.c" - file routines
#define NOMINMAX TRUE
#define NORESOURCE TRUE
#define NOATOM TRUE
#define NOLANGUAGE TRUE
#define OEMRESOURCE TRUE
#define NOMETAFILE TRUE
#define NOTEXTMETRIC TRUE
#define NOGDICAPMASKS TRUE
#define NODRAWTEXT TRUE
#define NOSHOWWINDOW TRUE
#define NOWH TRUE
#define NOMSG TRUE
#define NODEFERWINDOWPOS TRUE
#define NOCLIPBOARD TRUE
#define NOSYSMETRICS TRUE
#define NOSYSCOMMANDS TRUE
#define NOKANJI TRUE
#define NOSOUND TRUE
#define NOCOMM TRUE
#define NOPROFILER TRUE
#define NOMENUS TRUE
#define NOICONS TRUE
#define NOKEYSTATES TRUE
#define NOVIRTUALKEYCODES TRUE
#define NOHELP TRUE
#include "editpro.h"
#include "commdlg.h"
void FileRoutine( void);
void CreateMsgBox( HWND, WORD);
int OkayMessageBoxf( HWND, PSTR, int);
// external variables
extern HWND hWndMain;
extern char szFileName[256];
extern char szFileTitle[14];
extern HANDLE hInst;
extern char szAppName[];
// internal variables
OPENFILENAME ofn;
char szUntitled[] = "Untitled";
char szFilter[] = "All Files (*.*)\0*.*\0Text Files (*.txt)\0*.txt\0C Source (*.c)\0*.c\0C Header (*.h)\0*.h\0";
void FileRoutine()
{ HMENU hMenu;
HMENU hSubMenu;
memset( &ofn, 0, sizeof( OPENFILENAME));
ofn.lStructSize = sizeof( OPENFILENAME);
ofn.hwndOwner = hWndMain;
ofn.lpstrFilter = szFilter;
ofn.nFilterIndex = 1;
ofn.lpstrFile = szFileName;
ofn.nMaxFile = sizeof( szFileName);
ofn.lpstrFileTitle = szFileTitle;
ofn.nMaxFileTitle = sizeof( szFileTitle);
ofn.Flags = 0x00001004L;
GetOpenFileName( &ofn);
}
void CreateMsgBox( HWND hwnd, WORD wID)
{ char Buffer[128];
LoadString( hInst, wID, Buffer, sizeof( Buffer));
MessageBox( hwnd, Buffer, szAppName, MB_OK);
}
int OkayMessageBoxf( HWND hwnd, PSTR szformat, int num)
{ char szMsg[300];
wsprintf( szMsg, szformat, num);
return MessageBox( hwnd, szMsg, szAppName, MB_OK | MB_ICONINFORMATION);
}