windows-nt/Source/XPSP1/NT/com/winole/samples/clidemo/clidemo.h
2020-09-26 16:20:57 +08:00

63 lines
1.9 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* clidemo.h
*
* Created by Microsoft Corporation.
* (c) Copyright Microsoft Corp. 1990 - 1992 All Rights Reserved
*/
//*** CONSTANTS ***
#define CXDEFAULT 400 //* Default object size: 400 x 300
#define CYDEFAULT 300
#define COBJECTSMAX 50 //* max number of objects in our app
//*** PROTOTYPES ***
//*** Exported window procedures
LONG APIENTRY FrameWndProc(HWND, UINT, DWORD, LONG);
//*** FAR
VOID FAR FixObjectBounds(LPRECT lprc);
//*** Local
static LPOLECLIENT InitClient(HANDLE);
static VOID EndClient(LPOLECLIENT);
static LPAPPSTREAM InitStream(HANDLE);
static VOID EndStream(LPAPPSTREAM);
static VOID ProcessCmdLine(LPSTR);
static BOOL InitApplication(HANDLE);
static BOOL InitInstance(HANDLE);
static VOID SetTitle(PSTR);
static VOID MyOpenFile(PSTR,LHCLIENTDOC *, LPOLECLIENT, LPAPPSTREAM);
static VOID NewFile(PSTR,LHCLIENTDOC *, LPAPPSTREAM);
static BOOL SaveFile(PSTR, LHCLIENTDOC, LPAPPSTREAM);
static VOID SaveasFile(PSTR, LHCLIENTDOC, LPAPPSTREAM);
static BOOL LoadFile(PSTR, LHCLIENTDOC, LPOLECLIENT, LPAPPSTREAM);
static VOID ClearAll(LHCLIENTDOC, BOOL);
static VOID EndInstance(VOID);
static BOOL SaveAsNeeded(PSTR,LHCLIENTDOC,LPAPPSTREAM);
static VOID UpdateMenu(HMENU);
static BOOL RegDoc(PSTR, LHCLIENTDOC *);
static VOID DeregDoc(LHCLIENTDOC);
static BOOL InitAsOleClient(HANDLE, HWND, PSTR, LHCLIENTDOC *, LPOLECLIENT *, LPAPPSTREAM *);
VOID FAR ClearItem(APPITEMPTR);
static LONG QueryEndSession(PSTR, LHCLIENTDOC, LPAPPSTREAM);
//*** MACROS ***
/*
* ANY_OBJECT_BUSY
* checks to see if any object in the document is busy. This prevents
* a new document from being saved to file if there are objects in
* asynchronous states.
*/
#define ANY_OBJECT_BUSY {\
if (ObjectsBusy()) \
break; \
}