|
|
1.1 root 1: #include "windows.h"
2: #ifndef WIN16
3: #define WIN32 1 /* placed because RC can't pass in C_DEFINES*/
4: #include <commdlg.h>
5: #endif
6:
7: #ifdef WIN16
8: #include "drivinit.h"
9: #endif
10:
11: #ifdef WIN32
12: #define GET_EM_SETSEL_MPS(iStart, iEnd) (UINT)(iStart), (LONG)(iEnd)
13: #define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
14: #define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp)
15: #define GET_WM_COMMAND_MPS(id, hwnd, cmd) (UINT)MAKELONG(id, cmd), (LONG)(hwnd)
16: #define GET_EM_SETSEL_MPS(iStart, iEnd) (UINT)(iStart), (LONG)(iEnd)
17: #define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (lp == (LONG)hwnd)
18: #else
19: #define GET_EM_SETSEL_MPS(iStart, iEnd) 0, MAKELONG(iStart, iEnd)
20: #define GET_WM_COMMAND_CMD(wp, lp) HIWORD(lp)
21: #define GET_WM_COMMAND_HWND(wp, lp) (HWND)LOWORD(lp)
22: #define GET_WM_COMMAND_MPS(id, hwnd, cmd) (UINT)(id), MAKELONG(hwnd, cmd)
23: #define GET_EM_SETSEL_MPS(iStart, iEnd) 0, MAKELONG(iStart, iEnd)
24: #define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (BOOL)(wp)
25: #endif
26:
27:
28: #define WINDOWMENU 3 /* position of window menu */
29: #define SHORTMENU 2 /* position of short version window menu */
30:
31: #define DEFFILESEARCH (LPSTR) "*.TXT"
32:
33: #ifdef RC_INVOKED
34: #define ID(id) id
35: #else
36: #define ID(id) MAKEINTRESOURCE(id)
37: #endif
38:
39: /* edit control identifier */
40: #define ID_EDIT 0xCAC
41:
42: /* resource ID's */
43: #define IDMULTIPAD ID(1)
44: #define IDMULTIPAD2 ID(3)
45: #define IDNOTE ID(2)
46:
47: /* Window word values for child windows */
48: #define GWL_HWNDEDIT 0
49: #define GWW_CHANGED 4
50: #define GWL_WORDWRAP 6
51: #define GWW_UNTITLED 10
52: #define CBWNDEXTRA 12
53:
54: /* menu ID's */
55: #define IDM_FILENEW 1001
56: #define IDM_FILEOPEN 1002
57: #define IDM_FILESAVE 1003
58: #define IDM_FILESAVEAS 1004
59: #define IDM_FILEPRINT 1005
60: #define IDM_FILEEXIT 1006
61: #define IDM_FILEABOUT 1007
62: #define IDM_FILESETUP 1008
63: #define IDM_FILEMENU 1009
64:
65: #define IDM_EDITUNDO 2001
66: #define IDM_EDITCUT 2002
67: #define IDM_EDITCOPY 2003
68: #define IDM_EDITPASTE 2004
69: #define IDM_EDITCLEAR 2005
70: #define IDM_EDITSELECT 2006
71: #define IDM_EDITTIME 2007
72: #define IDM_EDITWRAP 2008
73: #define IDM_EDITFONT 2009
74: #define IDM_EDITFIRST IDM_EDITUNDO
75: #define IDM_EDITLAST IDM_EDITFONT
76:
77: #define IDM_SEARCHFIND 3001
78: #define IDM_SEARCHNEXT 3002
79: #define IDM_SEARCHPREV 3003
80: #define IDM_SEARCHFIRST IDM_SEARCHFIND
81: #define IDM_SEARCHLAST IDM_SEARCHPREV
82:
83: #define IDM_WINDOWTILE 4001
84: #define IDM_WINDOWCASCADE 4002
85: #define IDM_WINDOWCLOSEALL 4003
86: #define IDM_WINDOWICONS 4004
87:
88: #define IDM_WINDOWCHILD 4100
89:
90: #define IDM_HELPHELP 5001
91: #define IDM_HELPABOUT 5002
92: #define IDM_HELPSPOT 5003
93:
94: #define IDD_FILEOPEN ID(200)
95: #define IDD_FILENAME 201
96: #define IDD_FILES 202
97: #define IDD_PATH 203
98: #define IDD_DIRS 204
99:
100: /* dialog ids */
101: #define IDD_ABOUT ID(300)
102:
103: #define IDD_FIND ID(400)
104: #define IDD_SEARCH 401
105: #define IDD_PREV 402
106: #define IDD_NEXT IDOK
107: #define IDD_CASE 403
108:
109: #define IDD_SAVEAS ID(500)
110: #define IDD_SAVEFROM 501
111: #define IDD_SAVETO 502
112:
113: #define IDD_PRINT ID(600)
114: #define IDD_PRINTDEVICE 601
115: #define IDD_PRINTPORT 602
116: #define IDD_PRINTTITLE 603
117:
118: #define IDD_FONT ID(700)
119: #define IDD_FACES 701
120: #define IDD_SIZES 702
121: #define IDD_BOLD 703
122: #define IDD_ITALIC 704
123: #define IDD_FONTTITLE 705
124:
125: /* strings */
126: #define IDS_CANTOPEN 1
127: #define IDS_CANTREAD 2
128: #define IDS_CANTCREATE 3
129: #define IDS_CANTWRITE 4
130: #define IDS_ILLFNM 5
131: #define IDS_ADDEXT 6
132: #define IDS_CLOSESAVE 7
133: #define IDS_CANTFIND 8
134: #define IDS_HELPNOTAVAIL 9
135:
136: #define IDS_CLIENTTITLE 16
137: #define IDS_UNTITLED 17
138: #define IDS_APPNAME 18
139:
140: #define IDS_PRINTJOB 24
141: #define IDS_PRINTERROR 25
142:
143: /* attribute flags for DlgDirList */
144: #define ATTR_DIRS 0xC010 /* find drives and directories */
145: #define ATTR_FILES 0x0000 /* find ordinary files */
146: #define PROP_FILENAME szPropertyName /* name of property for dialog */
147:
148: /*
149: * External variable declarations
150: */
151: extern HANDLE hInst; /* application instance handle */
152: extern HANDLE hAccel; /* resource handle of accelerators */
153: extern HWND hwndFrame; /* main window handle */
154: extern HWND hwndMDIClient; /* handle of MDI Client window */
155: extern HWND hwndActive; /* handle of current active MDI child */
156: extern HWND hwndActiveEdit; /* handle of edit control in active child */
157: extern LONG styleDefault; /* default child creation state */
158: extern CHAR szChild[]; /* class of child */
159: extern CHAR szSearch[]; /* search string */
160: extern CHAR *szDriver; /* name of printer driver */
161: extern CHAR szPropertyName[]; /* filename property for dialog box */
162: extern INT iPrinter; /* level of printing capability */
163: extern BOOL fCase; /* searches case sensitive */
164: extern WORD cFonts; /* number of fonts enumerated */
165:
166: /* externally declared functions
167: */
168: extern BOOL APIENTRY InitializeApplication(VOID);
169: extern BOOL APIENTRY InitializeInstance(LPSTR,INT);
170: extern BOOL APIENTRY AboutDlgProc(HWND,UINT,UINT,LONG);
171: extern HWND APIENTRY AddFile(CHAR *);
172: extern VOID APIENTRY MyReadFile(HWND);
173: extern VOID APIENTRY SaveFile(HWND);
174: extern BOOL APIENTRY ChangeFile(HWND);
175: extern INT APIENTRY LoadFile(HWND, CHAR *);
176: extern VOID APIENTRY PrintFile(HWND);
177: extern BOOL APIENTRY GetInitializationData(HWND);
178: extern SHORT MPError(HWND,WORD,WORD, char *);
179: extern VOID APIENTRY Find(VOID);
180: extern VOID APIENTRY FindNext(VOID);
181: extern VOID APIENTRY FindPrev(VOID);
182: extern LONG APIENTRY MPFrameWndProc(HWND,UINT,UINT,LONG);
183: extern LONG APIENTRY MPMDIChildWndProc(HWND,UINT,UINT,LONG);
184: extern HDC APIENTRY GetPrinterDC(BOOL);
185: extern VOID NEAR PASCAL SetSaveFrom (HWND, PSTR);
186: extern BOOL NEAR PASCAL RealSlowCompare (PSTR, PSTR);
187: extern VOID APIENTRY FindPrev (VOID);
188: extern VOID APIENTRY FindNext (VOID);
189: extern BOOL NEAR PASCAL IsWild (PSTR);
190: extern VOID NEAR PASCAL SelectFile (HWND);
191: extern VOID NEAR PASCAL Local_FindText ( INT );
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.