--- mstools/samples/ddeml/client/client.h 2018/08/09 18:20:38 1.1 +++ mstools/samples/ddeml/client/client.h 2018/08/09 18:23:23 1.1.1.3 @@ -1,18 +1,28 @@ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + #include -#include #include -#define WINDOWMENU 3 /* position of window menu */ +#define WINDOWMENU 3 /* position of window menu */ /* resource ID's */ #define IDCLIENT 1 -#define IDCONV 2 -#define IDLIST 3 +#define IDCONV 2 +#define IDLIST 3 /* menu ID's */ -#define IDM_EDITPASTE 2004 +#define IDM_EDITPASTE 2004 #define IDM_CONNECT 3000 // enabled always #define IDM_RECONNECT 3001 // enabled if list selected @@ -38,19 +48,19 @@ #define IDM_CONTEXT 3023 #define IDM_AUTORECONNECT 3024 -#define IDM_WINDOWTILE 4001 +#define IDM_WINDOWTILE 4001 #define IDM_WINDOWCASCADE 4002 #define IDM_WINDOWCLOSEALL 4003 #define IDM_WINDOWICONS 4004 -#define IDM_XACTTILE 4005 +#define IDM_XACTTILE 4005 #define IDM_XACTCASCADE 4006 #define IDM_XACTCLOSEALL 4007 #define IDM_WINDOWCHILD 4100 -#define IDM_HELP 5001 -#define IDM_HELPABOUT 5002 +#define IDM_HELP 5001 +#define IDM_HELPABOUT 5002 #define DEFTIMEOUT 1000 @@ -76,7 +86,7 @@ typedef struct { INT y; CONVINFO ci; // most recent status info. } MYCONVINFO; // parameters to AddConv() in reverse order. -#define CHILDCBWNDEXTRA sizeof(HWND) +#define CHILDCBWNDEXTRA sizeof(HWND) #define UM_GETNEXTCHILDX (WM_USER + 200) #define UM_GETNEXTCHILDY (WM_USER + 201) #define UM_DISCONNECTED (WM_USER + 202) @@ -113,19 +123,19 @@ typedef struct { #define XOPT_COMPLETED 0x8000 // used internally only. /* strings */ -#define IDS_ILLFNM 1 -#define IDS_ADDEXT 2 -#define IDS_CLOSESAVE 3 +#define IDS_ILLFNM 1 +#define IDS_ADDEXT 2 +#define IDS_CLOSESAVE 3 #define IDS_HELPNOTAVAIL 4 #define IDS_CLIENTTITLE 5 -#define IDS_APPNAME 6 +#define IDS_APPNAME 6 #define IDS_DDEMLERR 7 #define IDS_BADLENGTH 8 /* attribute flags for DlgDirList */ -#define ATTR_DIRS 0xC010 /* find drives and directories */ -#define ATTR_FILES 0x0000 /* find ordinary files */ -#define PROP_FILENAME szPropertyName /* name of property for dialog */ +#define ATTR_DIRS 0xC010 /* find drives and directories */ +#define ATTR_FILES 0x0000 /* find ordinary files */ +#define PROP_FILENAME szPropertyName /* name of property for dialog */ #define MAX_OWNED 20 /* @@ -133,13 +143,13 @@ typedef struct { */ extern CONVCONTEXT CCFilter; extern DWORD idInst; -extern HANDLE hInst; /* application instance handle */ -extern HANDLE hAccel; /* resource handle of accelerators */ -extern HWND hwndFrame; /* main window handle */ -extern HWND hwndMDIClient; /* handle of MDI Client window */ -extern HWND hwndActive; /* handle of current active MDI child */ -extern HWND hwndActiveEdit; /* handle of edit control in active child */ -extern LONG styleDefault; /* default child creation state */ +extern HANDLE hInst; /* application instance handle */ +extern HANDLE hAccel; /* resource handle of accelerators */ +extern HWND hwndFrame; /* main window handle */ +extern HWND hwndMDIClient; /* handle of MDI Client window */ +extern HWND hwndActive; /* handle of current active MDI child */ +extern HWND hwndActiveEdit; /* handle of edit control in active child */ +extern LONG styleDefault; /* default child creation state */ extern DWORD SyncTimeout; extern LONG DefTimeout; extern DWORD wDelay; @@ -151,18 +161,20 @@ extern BOOL fAutoReconnect; extern HDDEDATA hDataOwned; extern DWORD fmtLink; // registered LINK clipboard fmt extern DWORD DefOptions; -extern CHAR szChild[]; /* class of child */ -extern CHAR szList[]; /* class of child */ -extern CHAR szSearch[]; /* search string */ -extern CHAR *szDriver; /* name of printer driver */ -extern CHAR szPropertyName[]; /* filename property for dialog box */ -extern INT iPrinter; /* level of printing capability */ -extern BOOL fCase; /* searches case sensitive */ -extern DWORD cFonts; /* number of fonts enumerated */ +extern CHAR szChild[]; /* class of child */ +extern CHAR szList[]; /* class of child */ +extern CHAR szSearch[]; /* search string */ +extern CHAR *szDriver; /* name of printer driver */ +extern CHAR szPropertyName[]; /* filename property for dialog box */ +extern INT iPrinter; /* level of printing capability */ +extern BOOL fCase; /* searches case sensitive */ +extern DWORD cFonts; /* number of fonts enumerated */ extern FORMATINFO aFormats[]; extern OWNED aOwned[MAX_OWNED]; extern DWORD cOwned; extern FARPROC lpMsgFilterProc; +extern HSZ hszHuge; +extern HHOOK ghhk; // MACROS @@ -184,26 +196,9 @@ extern FARPROC lpMsgFilterProc; BOOL APIENTRY InitializeApplication(VOID); BOOL APIENTRY InitializeInstance(DWORD); -HWND APIENTRY AddFile(CHAR *); -VOID APIENTRY MyReadFile(HWND); -VOID APIENTRY SaveFile(HWND); -BOOL APIENTRY ChangeFile(HWND); -INT APIENTRY LoadFile(HWND, CHAR *); -VOID APIENTRY PrintFile(HWND); -BOOL APIENTRY GetInitializationData(HWND); INT FAR cdecl MPError(DWORD,DWORD,...); -VOID APIENTRY Find(VOID); -VOID APIENTRY FindNext(VOID); -VOID APIENTRY FindPrev(VOID); LONG APIENTRY FrameWndProc(HWND, UINT, WPARAM, LPARAM); LONG APIENTRY MDIChildWndProc(HWND, UINT, WPARAM, LPARAM); -HDC APIENTRY GetPrinterDC(VOID); -VOID NEAR PASCAL SetSaveFrom (HWND, PSTR); -BOOL NEAR PASCAL RealSlowCompare (PSTR, PSTR); -VOID APIENTRY FindPrev (VOID); -VOID APIENTRY FindNext (VOID); -BOOL NEAR PASCAL IsWild (PSTR); -VOID NEAR PASCAL SelectFile (HWND); HCONV CreateConv(HSZ hszApp, HSZ hszTopic, BOOL fList); HWND APIENTRY AddConv(HSZ hszApp, HSZ hszTopic, HCONV hConv, BOOL fList); PSTR GetConvListText(HCONVLIST hConvList); @@ -214,12 +209,12 @@ PSTR State2String(DWORD state); PSTR Error2String(DWORD error); PSTR Type2String(DWORD wType, DWORD fsOptions); PSTR GetHSZName(HSZ hsz); -DWORD APIENTRY MyMsgFilterProc(INT nCode, WPARAM wParam, DWORD lParam); +LRESULT CALLBACK MyMsgFilterProc(int nCode, WPARAM wParam, LPARAM lParam); // dialog.c -INT FAR DoDialog(LPSTR lpTemplateName, WNDPROC lpDlgProc, LONG param, +INT FAR DoDialog(LPSTR lpTemplateName, DLGPROC lpDlgProc, LONG param, BOOL fRememberFocus); BOOL APIENTRY AboutDlgProc(HWND, UINT, WPARAM, LPARAM); BOOL APIENTRY ConnectDlgProc(HWND, UINT, WPARAM, LPARAM); @@ -253,4 +248,3 @@ BOOL MyDisconnect(HCONV hConv); PSTR DbgAlloc(DWORD cb); PSTR DbgFree(PSTR p); -