1 |
|
---|
2 | /***********************************************************************
|
---|
3 |
|
---|
4 | $Id: notebook.c 875 2007-11-23 23:14:45Z gyoung $
|
---|
5 |
|
---|
6 | Configuration notebook
|
---|
7 |
|
---|
8 | Copyright (c) 1993-98 M. Kimes
|
---|
9 | Copyright (c) 2004, 2007 Steven H. Levine
|
---|
10 |
|
---|
11 | 01 Aug 04 SHL Rework lstrip/rstrip usage
|
---|
12 | 23 May 05 SHL Use QWL_USER
|
---|
13 | 04 Jun 05 SHL Support Cancel button; make Esc key more consistent
|
---|
14 | 29 May 06 SHL Comments
|
---|
15 | 17 Jul 06 SHL Use Runtime_Error
|
---|
16 | 15 Aug 06 SHL Rework SetMask args
|
---|
17 | 03 Aug 07 GKY Enlarged and made setable everywhere Findbuf (speed file loading)
|
---|
18 | 13 Aug 07 SHL Move #pragma alloc_text to end for OpenWatcom compat
|
---|
19 | 13 Aug 07 SHL Rework FilesToGet min/max to match how DosFindFirst/Next works
|
---|
20 | 19 Aug 07 SHL Sync with SaveDirCnrState mods
|
---|
21 | 21 Aug 07 GKY Make Subject column in dircnr sizable and movable from the rigth to the left pane
|
---|
22 |
|
---|
23 | ***********************************************************************/
|
---|
24 |
|
---|
25 | #define INCL_DOS
|
---|
26 | #define INCL_WIN
|
---|
27 | #include <os2.h>
|
---|
28 |
|
---|
29 | #include <stdio.h>
|
---|
30 | #include <stdlib.h>
|
---|
31 | #include <string.h>
|
---|
32 |
|
---|
33 | #include "fm3dll.h"
|
---|
34 | #include "fm3dlg.h"
|
---|
35 | #include "fm3str.h"
|
---|
36 |
|
---|
37 | #pragma data_seg(DATA2)
|
---|
38 |
|
---|
39 | static PSZ pszSrcFile = __FILE__;
|
---|
40 |
|
---|
41 | typedef struct
|
---|
42 | {
|
---|
43 | USHORT frameid;
|
---|
44 | ULONG title;
|
---|
45 | PFNWP proc;
|
---|
46 | HWND hwnd;
|
---|
47 | ULONG helpid;
|
---|
48 | ULONG pageID;
|
---|
49 | }
|
---|
50 | NOTEPAGES;
|
---|
51 |
|
---|
52 | static HWND hwndNotebook;
|
---|
53 |
|
---|
54 | MRESULT EXPENTRY CfgADlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
55 | {
|
---|
56 | ULONG ulResult;
|
---|
57 |
|
---|
58 | switch (msg) {
|
---|
59 | case WM_INITDLG:
|
---|
60 | WinSendDlgItemMsg(hwnd, CFGA_VIRUS, EM_SETTEXTLIMIT,
|
---|
61 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
62 | WinSendDlgItemMsg(hwnd, CFGA_EXTRACTPATH, EM_SETTEXTLIMIT,
|
---|
63 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
64 | WinEnableWindow(WinWindowFromID(hwnd, CFGA_FIND), FALSE);
|
---|
65 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
66 | break;
|
---|
67 |
|
---|
68 | case UM_UNDO:
|
---|
69 | WinCheckButton(hwnd, CFGA_ARCSTUFFVISIBLE, fArcStuffVisible);
|
---|
70 | WinCheckButton(hwnd, CFGA_FOLDERAFTEREXTRACT, fFolderAfterExtract);
|
---|
71 | WinCheckButton(hwnd, CFGA_QUICKARCFIND, fQuickArcFind);
|
---|
72 | WinCheckButton(hwnd, CFGA_DEFARC, (*szDefArc != 0));
|
---|
73 | WinSetDlgItemText(hwnd, CFGA_DEFARCNAME, szDefArc);
|
---|
74 | WinSetDlgItemText(hwnd, CFGA_VIRUS, virus);
|
---|
75 | WinSetDlgItemText(hwnd, CFGA_EXTRACTPATH, extractpath);
|
---|
76 | break;
|
---|
77 |
|
---|
78 | case WM_CONTROL:
|
---|
79 | switch (SHORT1FROMMP(mp1)) {
|
---|
80 | case CFGA_VIRUS:
|
---|
81 | case CFGA_EXTRACTPATH:
|
---|
82 | switch (SHORT2FROMMP(mp1)) {
|
---|
83 | case EN_KILLFOCUS:
|
---|
84 | WinEnableWindow(WinWindowFromID(hwnd, CFGA_FIND), FALSE);
|
---|
85 | break;
|
---|
86 | case EN_SETFOCUS:
|
---|
87 | WinEnableWindow(WinWindowFromID(hwnd, CFGA_FIND), TRUE);
|
---|
88 | break;
|
---|
89 | }
|
---|
90 | break;
|
---|
91 | case CFGA_DEFARC:
|
---|
92 | switch (SHORT2FROMMP(mp1)) {
|
---|
93 | case BN_CLICKED:
|
---|
94 | if (WinQueryButtonCheckstate(hwnd, CFGA_DEFARC)) {
|
---|
95 |
|
---|
96 | ARC_TYPE *pat = arcsighead; // Hide dups
|
---|
97 |
|
---|
98 | if (!WinDlgBox(HWND_DESKTOP, hwnd,
|
---|
99 | SBoxDlgProc, FM3ModHandle, ASEL_FRAME,
|
---|
100 | (PVOID) & pat) || !pat || !pat->id || !*pat->id) {
|
---|
101 | DosBeep(250, 100); // Complain
|
---|
102 | WinCheckButton(hwnd, CFGA_DEFARC, FALSE);
|
---|
103 | }
|
---|
104 | else
|
---|
105 | WinSetDlgItemText(hwnd, CFGA_DEFARCNAME, pat->id);
|
---|
106 | }
|
---|
107 | break;
|
---|
108 | default:
|
---|
109 | break;
|
---|
110 | }
|
---|
111 | break;
|
---|
112 |
|
---|
113 | default:
|
---|
114 | break;
|
---|
115 | }
|
---|
116 | return 0;
|
---|
117 |
|
---|
118 | case WM_COMMAND:
|
---|
119 | switch (SHORT1FROMMP(mp1)) {
|
---|
120 | case IDM_UNDO:
|
---|
121 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
122 | break;
|
---|
123 |
|
---|
124 | case DID_CANCEL:
|
---|
125 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
126 |
|
---|
127 | case DID_OK:
|
---|
128 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
129 | break;
|
---|
130 |
|
---|
131 | case IDM_HELP:
|
---|
132 | if (hwndHelp)
|
---|
133 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
134 | MPFROM2SHORT(HELP_CFGA, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
135 | break;
|
---|
136 |
|
---|
137 | case CFGA_FIND:
|
---|
138 | {
|
---|
139 | CHAR filename[CCHMAXPATH + 9];
|
---|
140 | USHORT id;
|
---|
141 | HWND hwndFocus;
|
---|
142 |
|
---|
143 | strcpy(filename, "*.EXE");
|
---|
144 | hwndFocus = WinQueryFocus(HWND_DESKTOP);
|
---|
145 | if (hwndFocus) {
|
---|
146 | id = WinQueryWindowUShort(hwndFocus, QWS_ID);
|
---|
147 | switch (id) {
|
---|
148 | case CFGA_VIRUS:
|
---|
149 | if (insert_filename(hwnd, filename, 2, FALSE) && *filename)
|
---|
150 | WinSetDlgItemText(hwnd, id, filename);
|
---|
151 | break;
|
---|
152 | case CFGA_EXTRACTPATH:
|
---|
153 | strcpy(filename, extractpath);
|
---|
154 | if (WinDlgBox(HWND_DESKTOP, hwndNotebook,
|
---|
155 | WalkExtractDlgProc, FM3ModHandle, WALK_FRAME,
|
---|
156 | MPFROMP(filename)) && *filename)
|
---|
157 | WinSetDlgItemText(hwnd, id, filename);
|
---|
158 | break;
|
---|
159 | default:
|
---|
160 | Runtime_Error(pszSrcFile, __LINE__, "bad case");
|
---|
161 | break;
|
---|
162 | }
|
---|
163 | }
|
---|
164 | }
|
---|
165 | break;
|
---|
166 | }
|
---|
167 | return 0;
|
---|
168 |
|
---|
169 | case WM_CLOSE:
|
---|
170 | fQuickArcFind = WinQueryButtonCheckstate(hwnd, CFGA_QUICKARCFIND);
|
---|
171 | PrfWriteProfileData(fmprof,
|
---|
172 | appname,
|
---|
173 | "QuickArcFind", &fQuickArcFind, sizeof(BOOL));
|
---|
174 | fArcStuffVisible = WinQueryButtonCheckstate(hwnd, CFGA_ARCSTUFFVISIBLE);
|
---|
175 | PrfWriteProfileData(fmprof,
|
---|
176 | appname,
|
---|
177 | "ArcStuffVisible", &fArcStuffVisible, sizeof(BOOL));
|
---|
178 | fFolderAfterExtract = WinQueryButtonCheckstate(hwnd,
|
---|
179 | CFGA_FOLDERAFTEREXTRACT);
|
---|
180 | PrfWriteProfileData(fmprof,
|
---|
181 | appname,
|
---|
182 | "FolderAfterExtract",
|
---|
183 | &fFolderAfterExtract, sizeof(BOOL));
|
---|
184 | if (WinQueryButtonCheckstate(hwnd, CFGA_DEFARC)) {
|
---|
185 |
|
---|
186 | CHAR temp[CCHMAXPATH];
|
---|
187 |
|
---|
188 | *temp = 0;
|
---|
189 | WinQueryDlgItemText(hwnd, CFGA_DEFARCNAME, CCHMAXPATH, temp);
|
---|
190 | strcpy(szDefArc, temp);
|
---|
191 | }
|
---|
192 | else
|
---|
193 | *szDefArc = 0;
|
---|
194 | PrfWriteProfileString(fmprof, appname, "DefArc", szDefArc);
|
---|
195 | WinQueryDlgItemText(hwnd, CFGA_VIRUS, CCHMAXPATH, virus);
|
---|
196 | virus[CCHMAXPATH - 1] = 0;
|
---|
197 | bstrip(virus);
|
---|
198 | if (!*virus)
|
---|
199 | strcpy(virus, "OS2SCAN.EXE %p /SUB /A");
|
---|
200 | WinQueryDlgItemText(hwnd, CFGA_EXTRACTPATH, CCHMAXPATH, extractpath);
|
---|
201 | extractpath[CCHMAXPATH - 1] = 0;
|
---|
202 | bstrip(extractpath);
|
---|
203 | if (*extractpath) {
|
---|
204 | if (strcmp(extractpath, "*")) {
|
---|
205 |
|
---|
206 | MakeFullName(extractpath);
|
---|
207 | if (IsFile(extractpath)) {
|
---|
208 | ulResult = saymsg(MB_YESNOCANCEL | MB_ICONQUESTION | MB_DEFBUTTON1, HWND_DESKTOP,
|
---|
209 | "Bad pathname", "%s is not a valid directory\nDo you wish to delete it?",
|
---|
210 | extractpath);
|
---|
211 | if (ulResult == MBID_YES)
|
---|
212 | *extractpath = 0;
|
---|
213 | if (ulResult == MBID_CANCEL){
|
---|
214 | WinDlgBox(HWND_DESKTOP,
|
---|
215 | hwnd,
|
---|
216 | CfgDlgProc, FM3ModHandle, CFG_FRAME, (PVOID) "Archive");
|
---|
217 | break;
|
---|
218 | }
|
---|
219 | }
|
---|
220 | }
|
---|
221 | }
|
---|
222 | PrfWriteProfileString(fmprof, appname, "Virus", virus);
|
---|
223 | PrfWriteProfileString(fmprof, appname, "ExtractPath", extractpath);
|
---|
224 | break;
|
---|
225 | }
|
---|
226 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
227 | }
|
---|
228 |
|
---|
229 | MRESULT EXPENTRY CfgSDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
230 | {
|
---|
231 | switch (msg) {
|
---|
232 | case WM_INITDLG:
|
---|
233 | WinSendDlgItemMsg(hwnd, CFGS_FILESTOGET, SPBM_SETTEXTLIMIT,
|
---|
234 | MPFROMSHORT(8), MPVOID);
|
---|
235 | WinSendDlgItemMsg(hwnd, CFGS_FILESTOGET, SPBM_OVERRIDESETLIMITS,
|
---|
236 | MPFROMLONG(FILESTOGET_MAX), MPFROMLONG(FILESTOGET_MIN));
|
---|
237 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
238 | break;
|
---|
239 |
|
---|
240 | case UM_UNDO:
|
---|
241 | WinCheckButton(hwnd, CFGS_NOICONSFILES, (fNoIconsFiles == FALSE));
|
---|
242 | WinCheckButton(hwnd, CFGS_NOICONSDIRS, (fNoIconsDirs == FALSE));
|
---|
243 | WinCheckButton(hwnd, CFGS_LOADSUBJECTS, fLoadSubject);
|
---|
244 | WinCheckButton(hwnd, CFGS_LOADLONGNAMES, fLoadLongnames);
|
---|
245 | WinCheckButton(hwnd, CFGS_FORCELOWER, fForceLower);
|
---|
246 | WinCheckButton(hwnd, CFGS_FORCEUPPER, fForceUpper);
|
---|
247 | WinCheckButton(hwnd, CFGS_NOREMOVABLESCAN, fNoRemovableScan);
|
---|
248 | WinCheckButton(hwnd, CFGS_REMOTEBUG, fRemoteBug);
|
---|
249 | WinSendDlgItemMsg(hwnd, CFGS_FILESTOGET, SPBM_SETCURRENTVALUE,
|
---|
250 | MPFROMLONG(FilesToGet), MPVOID);
|
---|
251 | return 0;
|
---|
252 |
|
---|
253 | case WM_CONTROL:
|
---|
254 | switch (SHORT1FROMMP(mp1)) {
|
---|
255 | case CFGS_FORCEUPPER:
|
---|
256 | case CFGS_FORCELOWER:
|
---|
257 | {
|
---|
258 | BOOL temp;
|
---|
259 |
|
---|
260 | temp = WinQueryButtonCheckstate(hwnd, SHORT1FROMMP(mp1));
|
---|
261 | if (temp) {
|
---|
262 | switch (SHORT1FROMMP(mp1)) {
|
---|
263 | case CFGS_FORCEUPPER:
|
---|
264 | WinCheckButton(hwnd, CFGS_FORCELOWER, FALSE);
|
---|
265 | break;
|
---|
266 | case CFGS_FORCELOWER:
|
---|
267 | WinCheckButton(hwnd, CFGS_FORCEUPPER, FALSE);
|
---|
268 | break;
|
---|
269 | }
|
---|
270 | }
|
---|
271 | }
|
---|
272 | break;
|
---|
273 | }
|
---|
274 | return 0;
|
---|
275 |
|
---|
276 | case WM_COMMAND:
|
---|
277 | switch (SHORT1FROMMP(mp1)) {
|
---|
278 | case IDM_UNDO:
|
---|
279 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
280 | break;
|
---|
281 |
|
---|
282 | case DID_CANCEL:
|
---|
283 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
284 |
|
---|
285 | case DID_OK:
|
---|
286 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
287 | break;
|
---|
288 |
|
---|
289 | case IDM_HELP:
|
---|
290 | if (hwndHelp)
|
---|
291 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
292 | MPFROM2SHORT(HELP_CFGS, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
293 | break;
|
---|
294 | }
|
---|
295 | return 0;
|
---|
296 |
|
---|
297 | case WM_CLOSE:
|
---|
298 | fLoadLongnames = WinQueryButtonCheckstate(hwnd, CFGS_LOADLONGNAMES);
|
---|
299 | PrfWriteProfileData(fmprof, appname, "LoadLongname", &fLoadLongnames,
|
---|
300 | sizeof(BOOL));
|
---|
301 | fLoadSubject = WinQueryButtonCheckstate(hwnd, CFGS_LOADSUBJECTS);
|
---|
302 | PrfWriteProfileData(fmprof, appname, "LoadSubject", &fLoadSubject,
|
---|
303 | sizeof(BOOL));
|
---|
304 | fRemoteBug = WinQueryButtonCheckstate(hwnd, CFGS_REMOTEBUG);
|
---|
305 | PrfWriteProfileData(fmprof, appname, "RemoteBug", &fRemoteBug,
|
---|
306 | sizeof(BOOL));
|
---|
307 | fNoRemovableScan = WinQueryButtonCheckstate(hwnd, CFGS_NOREMOVABLESCAN);
|
---|
308 | PrfWriteProfileData(fmprof, FM3Str, "NoRemovableScan", &fNoRemovableScan,
|
---|
309 | sizeof(BOOL));
|
---|
310 | fNoIconsFiles = WinQueryButtonCheckstate(hwnd, CFGS_NOICONSFILES);
|
---|
311 | fNoIconsFiles = (fNoIconsFiles) ? FALSE : TRUE;
|
---|
312 | PrfWriteProfileData(fmprof, appname, "NoIconsFiles",
|
---|
313 | &fNoIconsFiles, sizeof(BOOL));
|
---|
314 | fNoIconsDirs = WinQueryButtonCheckstate(hwnd, CFGS_NOICONSDIRS);
|
---|
315 | fNoIconsDirs = (fNoIconsDirs) ? FALSE : TRUE;
|
---|
316 | PrfWriteProfileData(fmprof, appname, "NoIconsDirs",
|
---|
317 | &fNoIconsDirs, sizeof(BOOL));
|
---|
318 | fForceUpper = WinQueryButtonCheckstate(hwnd, CFGS_FORCEUPPER);
|
---|
319 | PrfWriteProfileData(fmprof, appname, "ForceUpper",
|
---|
320 | &fForceUpper, sizeof(BOOL));
|
---|
321 | fForceLower = WinQueryButtonCheckstate(hwnd, CFGS_FORCELOWER);
|
---|
322 | PrfWriteProfileData(fmprof, appname, "ForceLower",
|
---|
323 | &fForceLower, sizeof(BOOL));
|
---|
324 | {
|
---|
325 | WinSendDlgItemMsg(hwnd, CFGS_FILESTOGET, SPBM_QUERYVALUE,
|
---|
326 | MPFROMP(&FilesToGet), MPFROM2SHORT(0, SPBQ_DONOTUPDATE));
|
---|
327 | if (FilesToGet < FILESTOGET_MIN)
|
---|
328 | FilesToGet = FILESTOGET_MIN;
|
---|
329 | else if (FilesToGet > FILESTOGET_MAX)
|
---|
330 | FilesToGet = FILESTOGET_MAX;
|
---|
331 | PrfWriteProfileData(fmprof,
|
---|
332 | appname, "FilesToGet", &FilesToGet, sizeof(ULONG));
|
---|
333 | }
|
---|
334 | break;
|
---|
335 | }
|
---|
336 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
337 | }
|
---|
338 |
|
---|
339 | MRESULT EXPENTRY CfgVDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
340 | {
|
---|
341 | switch (msg) {
|
---|
342 | case WM_INITDLG:
|
---|
343 | WinSendDlgItemMsg(hwnd, CFGV_VIEWER, EM_SETTEXTLIMIT,
|
---|
344 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
345 | WinSendDlgItemMsg(hwnd, CFGV_EDITOR, EM_SETTEXTLIMIT,
|
---|
346 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
347 | WinSendDlgItemMsg(hwnd, CFGV_BINVIEW, EM_SETTEXTLIMIT,
|
---|
348 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
349 | WinSendDlgItemMsg(hwnd, CFGV_BINED, EM_SETTEXTLIMIT,
|
---|
350 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
351 | WinSendDlgItemMsg(hwnd, CFGV_FTPRUN, EM_SETTEXTLIMIT,
|
---|
352 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
353 | WinSendDlgItemMsg(hwnd, CFGV_HTTPRUN, EM_SETTEXTLIMIT,
|
---|
354 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
355 | WinEnableWindow(WinWindowFromID(hwnd, CFGV_FIND), FALSE);
|
---|
356 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
357 | break;
|
---|
358 |
|
---|
359 | case UM_UNDO:
|
---|
360 | WinSetDlgItemText(hwnd, CFGV_VIEWER, viewer);
|
---|
361 | WinSetDlgItemText(hwnd, CFGV_EDITOR, editor);
|
---|
362 | WinSetDlgItemText(hwnd, CFGV_BINVIEW, binview);
|
---|
363 | WinSetDlgItemText(hwnd, CFGV_BINED, bined);
|
---|
364 | WinSetDlgItemText(hwnd, CFGV_FTPRUN, ftprun);
|
---|
365 | WinSetDlgItemText(hwnd, CFGV_HTTPRUN, httprun);
|
---|
366 | WinCheckButton(hwnd, CFGV_USENEWVIEWER, fUseNewViewer);
|
---|
367 | WinCheckButton(hwnd, CFGV_GUESSTYPE, fGuessType);
|
---|
368 | WinCheckButton(hwnd, CFGV_VIEWCHILD, fViewChild);
|
---|
369 | WinCheckButton(hwnd, CFGV_CHECKMM, fCheckMM);
|
---|
370 | return 0;
|
---|
371 |
|
---|
372 | case WM_CONTROL:
|
---|
373 | switch (SHORT1FROMMP(mp1)) {
|
---|
374 | case CFGV_VIEWER:
|
---|
375 | case CFGV_EDITOR:
|
---|
376 | case CFGV_BINVIEW:
|
---|
377 | case CFGV_BINED:
|
---|
378 | case CFGV_HTTPRUN:
|
---|
379 | case CFGV_FTPRUN:
|
---|
380 | switch (SHORT2FROMMP(mp1)) {
|
---|
381 | case EN_KILLFOCUS:
|
---|
382 | WinEnableWindow(WinWindowFromID(hwnd, CFGV_FIND), FALSE);
|
---|
383 | break;
|
---|
384 | case EN_SETFOCUS:
|
---|
385 | WinEnableWindow(WinWindowFromID(hwnd, CFGV_FIND), TRUE);
|
---|
386 | break;
|
---|
387 | }
|
---|
388 | break;
|
---|
389 | }
|
---|
390 | return 0;
|
---|
391 |
|
---|
392 | case WM_COMMAND:
|
---|
393 | switch (SHORT1FROMMP(mp1)) {
|
---|
394 | case IDM_UNDO:
|
---|
395 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
396 | break;
|
---|
397 |
|
---|
398 | case DID_CANCEL:
|
---|
399 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
400 |
|
---|
401 | case DID_OK:
|
---|
402 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
403 | break;
|
---|
404 |
|
---|
405 | case IDM_HELP:
|
---|
406 | if (hwndHelp)
|
---|
407 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
408 | MPFROM2SHORT(HELP_CFGV, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
409 | break;
|
---|
410 |
|
---|
411 | case CFGV_FIND:
|
---|
412 | {
|
---|
413 | CHAR filename[CCHMAXPATH + 9];
|
---|
414 | USHORT id;
|
---|
415 | HWND hwndFocus;
|
---|
416 |
|
---|
417 | strcpy(filename, "*.EXE");
|
---|
418 | hwndFocus = WinQueryFocus(HWND_DESKTOP);
|
---|
419 | if (hwndFocus) {
|
---|
420 | id = WinQueryWindowUShort(hwndFocus, QWS_ID);
|
---|
421 | switch (id) {
|
---|
422 | case CFGV_BINVIEW:
|
---|
423 | case CFGV_BINED:
|
---|
424 | case CFGV_VIEWER:
|
---|
425 | case CFGV_EDITOR:
|
---|
426 | if (insert_filename(hwnd, filename, 2, FALSE) && *filename) {
|
---|
427 | strcat(filename, " %a");
|
---|
428 | WinSetDlgItemText(hwnd, id, filename);
|
---|
429 | }
|
---|
430 | break;
|
---|
431 | case CFGV_HTTPRUN:
|
---|
432 | case CFGV_FTPRUN:
|
---|
433 | if (insert_filename(hwnd, filename, 2, FALSE) && *filename)
|
---|
434 | WinSetDlgItemText(hwnd, id, filename);
|
---|
435 | break;
|
---|
436 | default:
|
---|
437 | Runtime_Error(pszSrcFile, __LINE__, "bad case %d", id);
|
---|
438 | break;
|
---|
439 | }
|
---|
440 | }
|
---|
441 | }
|
---|
442 | break;
|
---|
443 | }
|
---|
444 | return 0;
|
---|
445 |
|
---|
446 | case WM_CLOSE:
|
---|
447 | WinQueryDlgItemText(hwnd, CFGV_VIEWER, CCHMAXPATH, viewer);
|
---|
448 | viewer[CCHMAXPATH - 1] = 0;
|
---|
449 | bstrip(viewer);
|
---|
450 | WinQueryDlgItemText(hwnd, CFGV_EDITOR, CCHMAXPATH, editor);
|
---|
451 | editor[CCHMAXPATH - 1] = 0;
|
---|
452 | bstrip(editor);
|
---|
453 | WinQueryDlgItemText(hwnd, CFGV_BINVIEW, CCHMAXPATH, binview);
|
---|
454 | binview[CCHMAXPATH - 1] = 0;
|
---|
455 | bstrip(binview);
|
---|
456 | WinQueryDlgItemText(hwnd, CFGV_BINED, CCHMAXPATH, bined);
|
---|
457 | bined[CCHMAXPATH - 1] = 0;
|
---|
458 | bstrip(bined);
|
---|
459 | WinQueryDlgItemText(hwnd, CFGV_FTPRUN, CCHMAXPATH, ftprun);
|
---|
460 | ftprun[CCHMAXPATH - 1] = 0;
|
---|
461 | bstrip(ftprun);
|
---|
462 | WinQueryDlgItemText(hwnd, CFGV_HTTPRUN, CCHMAXPATH, httprun);
|
---|
463 | httprun[CCHMAXPATH - 1] = 0;
|
---|
464 | bstrip(httprun);
|
---|
465 | PrfWriteProfileString(fmprof, appname, "Viewer", viewer);
|
---|
466 | PrfWriteProfileString(fmprof, appname, "Editor", editor);
|
---|
467 | PrfWriteProfileString(fmprof, appname, "BinView", binview);
|
---|
468 | PrfWriteProfileString(fmprof, appname, "BinEd", bined);
|
---|
469 | PrfWriteProfileString(fmprof, appname, "FTPRun", ftprun);
|
---|
470 | PrfWriteProfileString(fmprof, appname, "HTTPRun", httprun);
|
---|
471 | fUseNewViewer = WinQueryButtonCheckstate(hwnd, CFGV_USENEWVIEWER);
|
---|
472 | PrfWriteProfileData(fmprof, appname, "UseNewViewer", &fUseNewViewer,
|
---|
473 | sizeof(BOOL));
|
---|
474 | fGuessType = WinQueryButtonCheckstate(hwnd, CFGV_GUESSTYPE);
|
---|
475 | PrfWriteProfileData(fmprof, appname, "GuessType", &fGuessType,
|
---|
476 | sizeof(BOOL));
|
---|
477 | fViewChild = WinQueryButtonCheckstate(hwnd, CFGV_VIEWCHILD);
|
---|
478 | PrfWriteProfileData(fmprof, appname, "ViewChild", &fViewChild,
|
---|
479 | sizeof(BOOL));
|
---|
480 | fCheckMM = WinQueryButtonCheckstate(hwnd, CFGV_CHECKMM);
|
---|
481 | PrfWriteProfileData(fmprof, appname, "CheckMM", &fCheckMM, sizeof(BOOL));
|
---|
482 | break;
|
---|
483 | }
|
---|
484 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
485 | }
|
---|
486 |
|
---|
487 | MRESULT EXPENTRY CfgBDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
488 | {
|
---|
489 | switch (msg) {
|
---|
490 | case WM_INITDLG:
|
---|
491 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
492 | break;
|
---|
493 |
|
---|
494 | case UM_UNDO:
|
---|
495 | WinCheckButton(hwnd, CFGB_TOOLBARHELP, fToolbarHelp);
|
---|
496 | WinCheckButton(hwnd, CFGB_DRIVEBARHELP, fDrivebarHelp);
|
---|
497 | WinCheckButton(hwnd, CFGB_OTHERHELP, fOtherHelp);
|
---|
498 | return 0;
|
---|
499 |
|
---|
500 | case WM_COMMAND:
|
---|
501 | switch (SHORT1FROMMP(mp1)) {
|
---|
502 | case IDM_UNDO:
|
---|
503 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
504 | break;
|
---|
505 |
|
---|
506 | case DID_CANCEL:
|
---|
507 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
508 |
|
---|
509 | case DID_OK:
|
---|
510 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
511 | break;
|
---|
512 |
|
---|
513 | case IDM_HELP:
|
---|
514 | if (hwndHelp)
|
---|
515 | WinSendMsg(hwndHelp,
|
---|
516 | HM_DISPLAY_HELP,
|
---|
517 | MPFROM2SHORT(HELP_CFGB, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
518 | break;
|
---|
519 | }
|
---|
520 | return 0;
|
---|
521 |
|
---|
522 | case WM_CLOSE:
|
---|
523 | fToolbarHelp = WinQueryButtonCheckstate(hwnd, CFGB_TOOLBARHELP);
|
---|
524 | PrfWriteProfileData(fmprof,
|
---|
525 | FM3Str, "ToolbarHelp", &fToolbarHelp, sizeof(BOOL));
|
---|
526 | fDrivebarHelp = WinQueryButtonCheckstate(hwnd, CFGB_DRIVEBARHELP);
|
---|
527 | PrfWriteProfileData(fmprof,
|
---|
528 | FM3Str, "DrivebarHelp", &fDrivebarHelp, sizeof(BOOL));
|
---|
529 | fOtherHelp = WinQueryButtonCheckstate(hwnd, CFGB_OTHERHELP);
|
---|
530 | PrfWriteProfileData(fmprof,
|
---|
531 | FM3Str, "OtherHelp", &fOtherHelp, sizeof(BOOL));
|
---|
532 | break;
|
---|
533 | }
|
---|
534 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
535 | }
|
---|
536 |
|
---|
537 | MRESULT EXPENTRY CfgTSDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
538 | {
|
---|
539 | static MASK mask;
|
---|
540 |
|
---|
541 | switch (msg) {
|
---|
542 | case WM_INITDLG:
|
---|
543 | WinSendDlgItemMsg(hwnd,
|
---|
544 | CFG5_FILTER,
|
---|
545 | EM_SETTEXTLIMIT, MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
546 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
547 | break;
|
---|
548 |
|
---|
549 | case UM_FOCUSME:
|
---|
550 | WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, IDM_HELP));
|
---|
551 | return 0;
|
---|
552 |
|
---|
553 | case UM_UNDO:
|
---|
554 | {
|
---|
555 | ULONG flWindowAttr = 0, size = sizeof(ULONG);
|
---|
556 |
|
---|
557 | if (!PrfQueryProfileData(fmprof,
|
---|
558 | appname,
|
---|
559 | "TreeflWindowAttr",
|
---|
560 | (PVOID) & flWindowAttr, &size))
|
---|
561 | flWindowAttr |= (CV_TREE | CA_TREELINE | CV_ICON | CV_MINI | CV_FLOW);
|
---|
562 | WinCheckButton(hwnd, CFG5_ICON, ((flWindowAttr & CV_ICON) != FALSE));
|
---|
563 | WinCheckButton(hwnd, CFG5_MINIICONS,
|
---|
564 | ((flWindowAttr & CV_MINI) != FALSE));
|
---|
565 | memset(&mask, 0, sizeof(mask));
|
---|
566 | mask.attrFile = FILE_DIRECTORY | FILE_ARCHIVED | FILE_HIDDEN |
|
---|
567 | FILE_SYSTEM | FILE_NORMAL | FILE_READONLY;
|
---|
568 | mask.fIsTree = TRUE;
|
---|
569 | size = sizeof(MASK);
|
---|
570 | if (PrfQueryProfileData(fmprof, appname, "TreeFilter", &mask, &size)) {
|
---|
571 | SetMask(NULL, &mask);
|
---|
572 | }
|
---|
573 | if (!mask.attrFile)
|
---|
574 | mask.attrFile = (FILE_READONLY | FILE_NORMAL |
|
---|
575 | FILE_ARCHIVED | FILE_DIRECTORY |
|
---|
576 | FILE_HIDDEN | FILE_SYSTEM);
|
---|
577 | strcpy(mask.prompt, GetPString(IDS_TREEFILTERTITLETEXT));
|
---|
578 | WinSetDlgItemText(hwnd, CFG5_FILTER, mask.szMask);
|
---|
579 | WinCheckButton(hwnd, CFG6_SORTFIRST, FALSE);
|
---|
580 | WinCheckButton(hwnd, CFG6_SORTLAST, FALSE);
|
---|
581 | WinCheckButton(hwnd, CFG6_SORTSIZE, FALSE);
|
---|
582 | WinCheckButton(hwnd, CFG6_SORTEASIZE, FALSE);
|
---|
583 | WinCheckButton(hwnd, CFG6_SORTLWDATE, FALSE);
|
---|
584 | WinCheckButton(hwnd, CFG6_SORTLADATE, FALSE);
|
---|
585 | WinCheckButton(hwnd, CFG6_SORTCRDATE, FALSE);
|
---|
586 | WinCheckButton(hwnd, CFG6_SORTNAME, FALSE);
|
---|
587 | WinCheckButton(hwnd, CFG6_SORTREVERSE, FALSE);
|
---|
588 | if (TreesortFlags & SORT_FIRSTEXTENSION)
|
---|
589 | WinCheckButton(hwnd, CFG6_SORTFIRST, TRUE);
|
---|
590 | else if (TreesortFlags & SORT_LASTEXTENSION)
|
---|
591 | WinCheckButton(hwnd, CFG6_SORTLAST, TRUE);
|
---|
592 | else if (TreesortFlags & SORT_SIZE)
|
---|
593 | WinCheckButton(hwnd, CFG6_SORTSIZE, TRUE);
|
---|
594 | else if (TreesortFlags & SORT_EASIZE)
|
---|
595 | WinCheckButton(hwnd, CFG6_SORTEASIZE, TRUE);
|
---|
596 | else if (TreesortFlags & SORT_LWDATE)
|
---|
597 | WinCheckButton(hwnd, CFG6_SORTLWDATE, TRUE);
|
---|
598 | else if (TreesortFlags & SORT_LADATE)
|
---|
599 | WinCheckButton(hwnd, CFG6_SORTLADATE, TRUE);
|
---|
600 | else if (TreesortFlags & SORT_CRDATE)
|
---|
601 | WinCheckButton(hwnd, CFG6_SORTCRDATE, TRUE);
|
---|
602 | else if (TreesortFlags & SORT_FILENAME)
|
---|
603 | WinCheckButton(hwnd, CFG6_SORTFILENAME, TRUE);
|
---|
604 | else
|
---|
605 | WinCheckButton(hwnd, CFG6_SORTNAME, TRUE);
|
---|
606 | if (TreesortFlags & SORT_REVERSE)
|
---|
607 | WinCheckButton(hwnd, CFG6_SORTREVERSE, TRUE);
|
---|
608 | }
|
---|
609 | return 0;
|
---|
610 |
|
---|
611 | case UM_SETUP5:
|
---|
612 | if (WinDlgBox(HWND_DESKTOP, hwndNotebook, PickMaskDlgProc,
|
---|
613 | FM3ModHandle, MSK_FRAME, MPFROMP(&mask))) {
|
---|
614 | SetMask(NULL, &mask);
|
---|
615 | WinSetDlgItemText(hwnd, CFG5_FILTER, mask.szMask);
|
---|
616 | }
|
---|
617 | return 0;
|
---|
618 |
|
---|
619 | case WM_CONTROL:
|
---|
620 | switch (SHORT1FROMMP(mp1)) {
|
---|
621 | case CFG5_FILTER:
|
---|
622 | switch (SHORT2FROMMP(mp1)) {
|
---|
623 | case EN_SETFOCUS:
|
---|
624 | PostMsg(hwnd, UM_FOCUSME, MPVOID, MPVOID);
|
---|
625 | PostMsg(hwnd, UM_SETUP5, MPVOID, MPVOID);
|
---|
626 | break;
|
---|
627 | }
|
---|
628 | break;
|
---|
629 | }
|
---|
630 | return 0;
|
---|
631 |
|
---|
632 | case WM_COMMAND:
|
---|
633 | switch (SHORT1FROMMP(mp1)) {
|
---|
634 | case IDM_UNDO:
|
---|
635 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
636 | break;
|
---|
637 |
|
---|
638 | case DID_CANCEL:
|
---|
639 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
640 |
|
---|
641 | case DID_OK:
|
---|
642 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
643 | break;
|
---|
644 |
|
---|
645 | case IDM_HELP:
|
---|
646 | if (hwndHelp)
|
---|
647 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
648 | MPFROM2SHORT(HELP_TREEVIEW, 0),
|
---|
649 | MPFROMSHORT(HM_RESOURCEID));
|
---|
650 | break;
|
---|
651 | }
|
---|
652 | return 0;
|
---|
653 |
|
---|
654 | case WM_CLOSE:
|
---|
655 | {
|
---|
656 | ULONG flWindowAttr = 0;
|
---|
657 |
|
---|
658 | if (WinQueryButtonCheckstate(hwnd, CFG5_ICON))
|
---|
659 | flWindowAttr |= CV_ICON;
|
---|
660 | else
|
---|
661 | flWindowAttr |= CV_TEXT;
|
---|
662 | if (WinQueryButtonCheckstate(hwnd, CFG5_MINIICONS))
|
---|
663 | flWindowAttr |= CV_MINI;
|
---|
664 | flWindowAttr |= (CV_TREE | CV_FLOW | CA_TREELINE);
|
---|
665 | PrfWriteProfileData(fmprof,
|
---|
666 | appname,
|
---|
667 | "TreeflWindowAttr", &flWindowAttr, sizeof(ULONG));
|
---|
668 | if (hwndTree) {
|
---|
669 |
|
---|
670 | CNRINFO cnri;
|
---|
671 |
|
---|
672 | memset(&cnri, 0, sizeof(cnri));
|
---|
673 | cnri.cb = sizeof(cnri);
|
---|
674 | WinSendMsg(WinWindowFromID
|
---|
675 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
676 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
677 | cnri.flWindowAttr = flWindowAttr;
|
---|
678 | WinSendMsg(WinWindowFromID
|
---|
679 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
680 | CM_SETCNRINFO, MPFROMP(&cnri),
|
---|
681 | MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
682 | }
|
---|
683 | }
|
---|
684 | TreesortFlags = 0;
|
---|
685 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTFILENAME))
|
---|
686 | TreesortFlags |= SORT_FILENAME;
|
---|
687 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTSIZE))
|
---|
688 | TreesortFlags |= SORT_SIZE;
|
---|
689 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTEASIZE))
|
---|
690 | TreesortFlags |= SORT_EASIZE;
|
---|
691 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTFIRST))
|
---|
692 | TreesortFlags |= SORT_FIRSTEXTENSION;
|
---|
693 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLAST))
|
---|
694 | TreesortFlags |= SORT_LASTEXTENSION;
|
---|
695 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLWDATE))
|
---|
696 | TreesortFlags |= SORT_LWDATE;
|
---|
697 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLADATE))
|
---|
698 | TreesortFlags |= SORT_LADATE;
|
---|
699 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTCRDATE))
|
---|
700 | TreesortFlags |= SORT_CRDATE;
|
---|
701 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTDIRSFIRST))
|
---|
702 | TreesortFlags |= SORT_DIRSFIRST;
|
---|
703 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTDIRSLAST))
|
---|
704 | TreesortFlags |= SORT_DIRSLAST;
|
---|
705 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTREVERSE))
|
---|
706 | TreesortFlags |= SORT_REVERSE;
|
---|
707 | PrfWriteProfileData(fmprof, appname, "TreeSort", &TreesortFlags,
|
---|
708 | sizeof(INT));
|
---|
709 | if (hwndTree)
|
---|
710 | PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_RESORT, 0), MPVOID);
|
---|
711 | *mask.prompt = 0;
|
---|
712 | PrfWriteProfileData(fmprof, appname, "TreeFilter", &mask, sizeof(MASK));
|
---|
713 | if (hwndTree) {
|
---|
714 |
|
---|
715 | DIRCNRDATA *dcd;
|
---|
716 |
|
---|
717 | dcd = WinQueryWindowPtr(WinWindowFromID(WinWindowFromID(hwndTree,
|
---|
718 | FID_CLIENT),
|
---|
719 | TREE_CNR), QWL_USER);
|
---|
720 | if (dcd && dcd->size == sizeof(DIRCNRDATA)) {
|
---|
721 | dcd->mask = mask;
|
---|
722 | PostMsg(hwndTree, UM_FILTER, MPVOID, MPVOID);
|
---|
723 | }
|
---|
724 | }
|
---|
725 | break;
|
---|
726 | }
|
---|
727 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
728 | }
|
---|
729 |
|
---|
730 | MRESULT EXPENTRY CfgTDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
731 | {
|
---|
732 | switch (msg) {
|
---|
733 | case WM_INITDLG:
|
---|
734 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
735 | break;
|
---|
736 |
|
---|
737 | case UM_UNDO:
|
---|
738 | WinCheckButton(hwnd, CFGT_FOLLOWTREE, fFollowTree);
|
---|
739 | WinCheckButton(hwnd, CFGT_TOPDIR, fTopDir);
|
---|
740 | WinCheckButton(hwnd, CFGT_DCOPENS, fDCOpens);
|
---|
741 | WinCheckButton(hwnd, CFGT_VTREEOPENSWPS, fVTreeOpensWPS);
|
---|
742 | WinCheckButton(hwnd, CFGT_COLLAPSEFIRST, fCollapseFirst);
|
---|
743 | WinCheckButton(hwnd, CFGT_SWITCHTREEONFOCUS, fSwitchTreeOnFocus);
|
---|
744 | WinCheckButton(hwnd, CFGT_SWITCHTREE, fSwitchTree);
|
---|
745 | WinCheckButton(hwnd, CFGT_SWITCHTREEEXPAND, fSwitchTreeExpand);
|
---|
746 | WinCheckButton(hwnd, CFGT_SHOWENV, fShowEnv);
|
---|
747 | return 0;
|
---|
748 |
|
---|
749 | case WM_COMMAND:
|
---|
750 | switch (SHORT1FROMMP(mp1)) {
|
---|
751 | case IDM_UNDO:
|
---|
752 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
753 | break;
|
---|
754 |
|
---|
755 | case DID_CANCEL:
|
---|
756 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
757 |
|
---|
758 | case DID_OK:
|
---|
759 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
760 | break;
|
---|
761 |
|
---|
762 | case IDM_HELP:
|
---|
763 | if (hwndHelp)
|
---|
764 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
765 | MPFROM2SHORT(HELP_CFGT, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
766 | break;
|
---|
767 | }
|
---|
768 | return 0;
|
---|
769 |
|
---|
770 | case WM_CLOSE:
|
---|
771 | fVTreeOpensWPS = WinQueryButtonCheckstate(hwnd, CFGT_VTREEOPENSWPS);
|
---|
772 | PrfWriteProfileData(fmprof, FM3Str, "VTreeOpensWPS", &fVTreeOpensWPS,
|
---|
773 | sizeof(BOOL));
|
---|
774 | fCollapseFirst = WinQueryButtonCheckstate(hwnd, CFGT_COLLAPSEFIRST);
|
---|
775 | PrfWriteProfileData(fmprof, appname, "CollapseFirst", &fCollapseFirst,
|
---|
776 | sizeof(BOOL));
|
---|
777 | fSwitchTreeOnFocus = WinQueryButtonCheckstate(hwnd,
|
---|
778 | CFGT_SWITCHTREEONFOCUS);
|
---|
779 | PrfWriteProfileData(fmprof, appname, "SwitchTreeOnFocus",
|
---|
780 | &fSwitchTreeOnFocus, sizeof(BOOL));
|
---|
781 | fSwitchTreeExpand = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREEEXPAND);
|
---|
782 | PrfWriteProfileData(fmprof, appname, "SwitchTreeExpand",
|
---|
783 | &fSwitchTreeExpand, sizeof(BOOL));
|
---|
784 | fSwitchTree = WinQueryButtonCheckstate(hwnd, CFGT_SWITCHTREE);
|
---|
785 | PrfWriteProfileData(fmprof, appname, "SwitchTree", &fSwitchTree,
|
---|
786 | sizeof(BOOL));
|
---|
787 | fFollowTree = WinQueryButtonCheckstate(hwnd, CFGT_FOLLOWTREE);
|
---|
788 | PrfWriteProfileData(fmprof, appname, "FollowTree", &fFollowTree,
|
---|
789 | sizeof(BOOL));
|
---|
790 | fTopDir = WinQueryButtonCheckstate(hwnd, CFGT_TOPDIR);
|
---|
791 | PrfWriteProfileData(fmprof, appname, "TopDir", (PVOID) & fTopDir,
|
---|
792 | sizeof(BOOL));
|
---|
793 | fDCOpens = WinQueryButtonCheckstate(hwnd, CFGT_DCOPENS);
|
---|
794 | PrfWriteProfileData(fmprof, FM3Str, "DoubleClickOpens", &fDCOpens,
|
---|
795 | sizeof(BOOL));
|
---|
796 | if (hwndTree && fShowEnv != WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV))
|
---|
797 | PostMsg(WinWindowFromID
|
---|
798 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR), WM_COMMAND,
|
---|
799 | MPFROM2SHORT(IDM_RESCAN, 0), MPVOID);
|
---|
800 | fShowEnv = WinQueryButtonCheckstate(hwnd, CFGT_SHOWENV);
|
---|
801 | PrfWriteProfileData(fmprof, appname, "ShowEnv", &fShowEnv, sizeof(BOOL));
|
---|
802 | break;
|
---|
803 | }
|
---|
804 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
805 | }
|
---|
806 |
|
---|
807 | MRESULT EXPENTRY CfgGDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
808 | {
|
---|
809 | switch (msg) {
|
---|
810 | case WM_INITDLG:
|
---|
811 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
812 | break;
|
---|
813 |
|
---|
814 | case UM_UNDO:
|
---|
815 | WinCheckButton(hwnd, CFGG_CONFIRMDELETE, fConfirmDelete);
|
---|
816 | WinCheckButton(hwnd, CFGG_VERIFYWRITES, fVerify);
|
---|
817 | WinCheckButton(hwnd, CFGG_LINKSETSICON, fLinkSetsIcon);
|
---|
818 | WinCheckButton(hwnd, CFGG_DONTMOVEMOUSE, fDontMoveMouse);
|
---|
819 | WinCheckButton(hwnd, CFGG_DEFAULTCOPY, fCopyDefault);
|
---|
820 | WinCheckButton(hwnd, CFGG_IDLECOPY, fRealIdle);
|
---|
821 | WinCheckButton(hwnd, CFGG_DNDDLG, fDragndropDlg);
|
---|
822 | WinCheckButton(hwnd, CFGG_DEFAULTDELETEPERM, fDefaultDeletePerm);
|
---|
823 | {
|
---|
824 | long th = fNoFinger ? 2 : (fNoDead ? 1 : 0);
|
---|
825 | WinCheckButton(hwnd, CFGG_NODEAD, th);
|
---|
826 | }
|
---|
827 | WinCheckButton(hwnd, CFGG_BORING, fDullMin);
|
---|
828 | WinCheckButton(hwnd, CFGG_CUSTOMFILEDLG, fCustomFileDlg);
|
---|
829 | WinCheckButton(hwnd, CFGG_FM2DELETES, fFM2Deletes);
|
---|
830 | WinCheckButton(hwnd, CFGG_CONFIRMTARGET, fConfirmTarget);
|
---|
831 | WinSetDlgItemText(hwnd, CFGG_TARGETDIR, targetdir);
|
---|
832 | return 0;
|
---|
833 |
|
---|
834 | case UM_FOCUSME:
|
---|
835 | WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, IDM_HELP));
|
---|
836 | return 0;
|
---|
837 |
|
---|
838 | case UM_SETUP5:
|
---|
839 | SetTargetDir(hwnd, FALSE);
|
---|
840 | WinSetDlgItemText(hwnd, CFGG_TARGETDIR, targetdir);
|
---|
841 | return 0;
|
---|
842 |
|
---|
843 | case WM_CONTROL:
|
---|
844 | switch (SHORT1FROMMP(mp1)) {
|
---|
845 | case CFGG_TARGETDIR:
|
---|
846 | switch (SHORT2FROMMP(mp1)) {
|
---|
847 | case EN_SETFOCUS:
|
---|
848 | PostMsg(hwnd, UM_FOCUSME, MPVOID, MPVOID);
|
---|
849 | PostMsg(hwnd, UM_SETUP5, MPVOID, MPVOID);
|
---|
850 | break;
|
---|
851 | }
|
---|
852 | break;
|
---|
853 | }
|
---|
854 | return 0;
|
---|
855 |
|
---|
856 | case WM_COMMAND:
|
---|
857 | switch (SHORT1FROMMP(mp1)) {
|
---|
858 | case IDM_UNDO:
|
---|
859 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
860 | break;
|
---|
861 |
|
---|
862 | case DID_CANCEL:
|
---|
863 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
864 |
|
---|
865 | case DID_OK:
|
---|
866 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
867 | break;
|
---|
868 |
|
---|
869 | case IDM_HELP:
|
---|
870 | if (hwndHelp)
|
---|
871 | WinSendMsg(hwndHelp,
|
---|
872 | HM_DISPLAY_HELP,
|
---|
873 | MPFROM2SHORT(HELP_CFGG, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
874 | break;
|
---|
875 | }
|
---|
876 | return 0;
|
---|
877 |
|
---|
878 | case WM_CLOSE:
|
---|
879 | {
|
---|
880 | long test;
|
---|
881 |
|
---|
882 | test = WinQueryButtonCheckstate(hwnd, CFGG_NODEAD);
|
---|
883 | fNoDead = (test == 1);
|
---|
884 | fNoFinger = (test == 2);
|
---|
885 | PrfWriteProfileData(fmprof, FM3Str, "NoDead", &fNoDead, sizeof(BOOL));
|
---|
886 | PrfWriteProfileData(fmprof,
|
---|
887 | FM3Str, "NoFinger", &fNoFinger, sizeof(BOOL));
|
---|
888 | WinDestroyPointer(hptrFinger);
|
---|
889 | if (!fNoDead)
|
---|
890 | hptrFinger = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FINGER_ICON);
|
---|
891 | else
|
---|
892 | hptrFinger = WinLoadPointer(HWND_DESKTOP, FM3ModHandle, FINGER2_ICON);
|
---|
893 | }
|
---|
894 | fLinkSetsIcon = WinQueryButtonCheckstate(hwnd, CFGG_LINKSETSICON);
|
---|
895 | PrfWriteProfileData(fmprof,
|
---|
896 | appname,
|
---|
897 | "LinkSetsIcon", &fLinkSetsIcon, sizeof(BOOL));
|
---|
898 | fCustomFileDlg = WinQueryButtonCheckstate(hwnd, CFGG_CUSTOMFILEDLG);
|
---|
899 | PrfWriteProfileData(fmprof,
|
---|
900 | FM3Str,
|
---|
901 | "CustomFileDlg", &fCustomFileDlg, sizeof(BOOL));
|
---|
902 | fDullMin = WinQueryButtonCheckstate(hwnd, CFGG_BORING);
|
---|
903 | PrfWriteProfileData(fmprof,
|
---|
904 | FM3Str, "DullDatabar", &fDullMin, sizeof(BOOL));
|
---|
905 | fConfirmDelete = WinQueryButtonCheckstate(hwnd, CFGG_CONFIRMDELETE);
|
---|
906 | PrfWriteProfileData(fmprof,
|
---|
907 | appname,
|
---|
908 | "ConfirmDelete", &fConfirmDelete, sizeof(BOOL));
|
---|
909 | fDontMoveMouse = WinQueryButtonCheckstate(hwnd, CFGG_DONTMOVEMOUSE);
|
---|
910 | PrfWriteProfileData(fmprof,
|
---|
911 | appname,
|
---|
912 | "DontMoveMouse", &fDontMoveMouse, sizeof(BOOL));
|
---|
913 | fCopyDefault = WinQueryButtonCheckstate(hwnd, CFGG_DEFAULTCOPY);
|
---|
914 | PrfWriteProfileData(fmprof, appname, "DefaultCopy",
|
---|
915 | &fCopyDefault, sizeof(BOOL));
|
---|
916 | fRealIdle = WinQueryButtonCheckstate(hwnd, CFGG_IDLECOPY);
|
---|
917 | PrfWriteProfileData(fmprof, appname, "IdleCopy",
|
---|
918 | &fRealIdle, sizeof(BOOL));
|
---|
919 | fDragndropDlg = WinQueryButtonCheckstate(hwnd, CFGG_DNDDLG);
|
---|
920 | PrfWriteProfileData(fmprof, appname, "Drag&DropDlg",
|
---|
921 | &fDragndropDlg, sizeof(BOOL));
|
---|
922 | fVerify = WinQueryButtonCheckstate(hwnd, CFGG_VERIFYWRITES);
|
---|
923 | PrfWriteProfileData(fmprof, appname, "VerifyWrites",
|
---|
924 | &fVerify, sizeof(BOOL));
|
---|
925 | DosSetVerify(fVerify);
|
---|
926 | fDefaultDeletePerm = WinQueryButtonCheckstate(hwnd,
|
---|
927 | CFGG_DEFAULTDELETEPERM);
|
---|
928 | PrfWriteProfileData(fmprof, appname, "DefaultDeletePerm",
|
---|
929 | &fDefaultDeletePerm, sizeof(BOOL));
|
---|
930 | fFM2Deletes = WinQueryButtonCheckstate(hwnd, CFGG_FM2DELETES);
|
---|
931 | PrfWriteProfileData(fmprof, FM3Str, "FM2Deletes",
|
---|
932 | &fFM2Deletes, sizeof(BOOL));
|
---|
933 | fConfirmTarget = WinQueryButtonCheckstate(hwnd, CFGG_CONFIRMTARGET);
|
---|
934 | PrfWriteProfileData(fmprof, appname, "ConfirmTarget",
|
---|
935 | &fConfirmTarget, sizeof(BOOL));
|
---|
936 | break;
|
---|
937 | }
|
---|
938 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
939 | }
|
---|
940 |
|
---|
941 | MRESULT EXPENTRY CfgCDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
942 | {
|
---|
943 | switch (msg) {
|
---|
944 | case WM_INITDLG:
|
---|
945 | WinSendDlgItemMsg(hwnd, CFGC_COMPARE, EM_SETTEXTLIMIT,
|
---|
946 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
947 | WinSendDlgItemMsg(hwnd, CFGC_DIRCOMPARE, EM_SETTEXTLIMIT,
|
---|
948 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
949 | WinEnableWindow(WinWindowFromID(hwnd, CFGC_FIND), FALSE);
|
---|
950 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
951 | break;
|
---|
952 |
|
---|
953 | case UM_UNDO:
|
---|
954 | WinSetDlgItemText(hwnd, CFGC_COMPARE, compare);
|
---|
955 | WinSetDlgItemText(hwnd, CFGC_DIRCOMPARE, dircompare);
|
---|
956 | return 0;
|
---|
957 |
|
---|
958 | case WM_CONTROL:
|
---|
959 | switch (SHORT1FROMMP(mp1)) {
|
---|
960 | case CFGC_COMPARE:
|
---|
961 | case CFGC_DIRCOMPARE:
|
---|
962 | switch (SHORT2FROMMP(mp1)) {
|
---|
963 | case EN_KILLFOCUS:
|
---|
964 | WinEnableWindow(WinWindowFromID(hwnd, CFGC_FIND), FALSE);
|
---|
965 | break;
|
---|
966 | case EN_SETFOCUS:
|
---|
967 | WinEnableWindow(WinWindowFromID(hwnd, CFGC_FIND), TRUE);
|
---|
968 | break;
|
---|
969 | }
|
---|
970 | break;
|
---|
971 | }
|
---|
972 | return 0;
|
---|
973 |
|
---|
974 | case WM_COMMAND:
|
---|
975 | switch (SHORT1FROMMP(mp1)) {
|
---|
976 | case IDM_UNDO:
|
---|
977 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
978 | break;
|
---|
979 |
|
---|
980 | case DID_CANCEL:
|
---|
981 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
982 |
|
---|
983 | case DID_OK:
|
---|
984 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
985 | break;
|
---|
986 |
|
---|
987 | case IDM_HELP:
|
---|
988 | if (hwndHelp)
|
---|
989 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
990 | MPFROM2SHORT(HELP_CFGC, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
991 | break;
|
---|
992 |
|
---|
993 | case CFGC_FIND:
|
---|
994 | {
|
---|
995 | CHAR filename[CCHMAXPATH + 9];
|
---|
996 | USHORT id;
|
---|
997 | HWND hwndFocus;
|
---|
998 |
|
---|
999 | strcpy(filename, "*.EXE");
|
---|
1000 | hwndFocus = WinQueryFocus(HWND_DESKTOP);
|
---|
1001 | if (hwndFocus) {
|
---|
1002 | id = WinQueryWindowUShort(hwndFocus, QWS_ID);
|
---|
1003 | switch (id) {
|
---|
1004 | case CFGC_COMPARE:
|
---|
1005 | case CFGC_DIRCOMPARE:
|
---|
1006 | if (insert_filename(hwnd, filename, 2, FALSE) && *filename) {
|
---|
1007 | strcat(filename, " %a");
|
---|
1008 | WinSetDlgItemText(hwnd, id, filename);
|
---|
1009 | }
|
---|
1010 | break;
|
---|
1011 | default:
|
---|
1012 | Runtime_Error(pszSrcFile, __LINE__, "bad case %d", id);
|
---|
1013 | break;
|
---|
1014 | }
|
---|
1015 | }
|
---|
1016 | }
|
---|
1017 | break;
|
---|
1018 | }
|
---|
1019 | return 0;
|
---|
1020 |
|
---|
1021 | case WM_CLOSE:
|
---|
1022 | WinQueryDlgItemText(hwnd, CFGC_DIRCOMPARE, CCHMAXPATH, dircompare);
|
---|
1023 | dircompare[CCHMAXPATH - 1] = 0;
|
---|
1024 | bstrip(dircompare);
|
---|
1025 | PrfWriteProfileString(fmprof, appname, "DirCompare", dircompare);
|
---|
1026 | WinQueryDlgItemText(hwnd, CFGC_COMPARE, CCHMAXPATH, compare);
|
---|
1027 | compare[CCHMAXPATH - 1] = 0;
|
---|
1028 | bstrip(compare);
|
---|
1029 | PrfWriteProfileString(fmprof, appname, "Compare", compare);
|
---|
1030 | break;
|
---|
1031 | }
|
---|
1032 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
1033 | }
|
---|
1034 |
|
---|
1035 | MRESULT EXPENTRY CfgDDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
1036 | {
|
---|
1037 | switch (msg) {
|
---|
1038 | case WM_INITDLG:
|
---|
1039 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1040 | break;
|
---|
1041 |
|
---|
1042 | case UM_UNDO:
|
---|
1043 | WinCheckButton(hwnd, CFGD_UNHILITE, fUnHilite);
|
---|
1044 | WinCheckButton(hwnd, CFGD_SYNCUPDATES, fSyncUpdates);
|
---|
1045 | WinCheckButton(hwnd, CFGD_LOOKINDIR, fLookInDir);
|
---|
1046 | WinCheckButton(hwnd, CFGD_MINONOPEN, fMinOnOpen);
|
---|
1047 | WinCheckButton(hwnd, CFGD_SELECTEDALWAYS, fSelectedAlways);
|
---|
1048 | WinCheckButton(hwnd, CFGD_NOSEARCH, fNoSearch);
|
---|
1049 | WinCheckButton(hwnd, CFGD_EXTENDEDSEL,
|
---|
1050 | ((ulCnrType & CCS_EXTENDSEL) != 0));
|
---|
1051 | WinCheckButton(hwnd, CFGD_MULTIPLESEL,
|
---|
1052 | ((ulCnrType & CCS_MULTIPLESEL) != 0));
|
---|
1053 | WinCheckButton(hwnd, CFGD_LEAVETREE, fLeaveTree);
|
---|
1054 | WinCheckButton(hwnd, CFGD_NOFOLDMENU, fNoFoldMenu);
|
---|
1055 | return 0;
|
---|
1056 |
|
---|
1057 | case WM_COMMAND:
|
---|
1058 | switch (SHORT1FROMMP(mp1)) {
|
---|
1059 | case IDM_UNDO:
|
---|
1060 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1061 | break;
|
---|
1062 |
|
---|
1063 | case DID_CANCEL:
|
---|
1064 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1065 |
|
---|
1066 | case DID_OK:
|
---|
1067 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
1068 | break;
|
---|
1069 |
|
---|
1070 | case IDM_HELP:
|
---|
1071 | if (hwndHelp)
|
---|
1072 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
1073 | MPFROM2SHORT(HELP_CFGD, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
1074 | break;
|
---|
1075 | }
|
---|
1076 | return 0;
|
---|
1077 |
|
---|
1078 | case WM_CLOSE:
|
---|
1079 | ulCnrType = 0;
|
---|
1080 | if (WinQueryButtonCheckstate(hwnd, CFGD_EXTENDEDSEL))
|
---|
1081 | ulCnrType |= CCS_EXTENDSEL;
|
---|
1082 | if (WinQueryButtonCheckstate(hwnd, CFGD_MULTIPLESEL))
|
---|
1083 | ulCnrType |= CCS_MULTIPLESEL;
|
---|
1084 | PrfWriteProfileData(fmprof, appname, "ContainerType",
|
---|
1085 | (PVOID) & ulCnrType, sizeof(BOOL));
|
---|
1086 | fMinOnOpen = WinQueryButtonCheckstate(hwnd, CFGD_MINONOPEN);
|
---|
1087 | PrfWriteProfileData(fmprof, FM3Str, "MinDirOnOpen", &fMinOnOpen,
|
---|
1088 | sizeof(BOOL));
|
---|
1089 | fLeaveTree = WinQueryButtonCheckstate(hwnd, CFGD_LEAVETREE);
|
---|
1090 | PrfWriteProfileData(fmprof, appname, "LeaveTree", &fLeaveTree,
|
---|
1091 | sizeof(BOOL));
|
---|
1092 | fNoFoldMenu = WinQueryButtonCheckstate(hwnd, CFGD_NOFOLDMENU);
|
---|
1093 | PrfWriteProfileData(fmprof, appname, "NoFoldMenu", &fNoFoldMenu,
|
---|
1094 | sizeof(BOOL));
|
---|
1095 | fSelectedAlways = WinQueryButtonCheckstate(hwnd, CFGD_SELECTEDALWAYS);
|
---|
1096 | PrfWriteProfileData(fmprof, appname, "SelectedAlways", &fSelectedAlways,
|
---|
1097 | sizeof(BOOL));
|
---|
1098 | fNoSearch = WinQueryButtonCheckstate(hwnd, CFGD_NOSEARCH);
|
---|
1099 | PrfWriteProfileData(fmprof, appname, "NoSearch", &fNoSearch,
|
---|
1100 | sizeof(BOOL));
|
---|
1101 | fLookInDir = WinQueryButtonCheckstate(hwnd, CFGD_LOOKINDIR);
|
---|
1102 | PrfWriteProfileData(fmprof, FM3Str, "LookInDir", (PVOID) & fLookInDir,
|
---|
1103 | sizeof(BOOL));
|
---|
1104 | fUnHilite = WinQueryButtonCheckstate(hwnd, CFGD_UNHILITE);
|
---|
1105 | PrfWriteProfileData(fmprof, appname, "UnHilite",
|
---|
1106 | &fUnHilite, sizeof(BOOL));
|
---|
1107 | {
|
---|
1108 | BOOL dummy = WinQueryButtonCheckstate(hwnd, CFGD_SYNCUPDATES);
|
---|
1109 |
|
---|
1110 | if (dummy != fSyncUpdates) {
|
---|
1111 | fSyncUpdates = dummy;
|
---|
1112 | if (hwndMain && !strcmp(realappname, FM3Str)) {
|
---|
1113 | if (SaveDirCnrState(hwndMain, GetPString(IDS_FM2TEMPTEXT)) > 0) {
|
---|
1114 | PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(2));
|
---|
1115 | PostMsg(hwndMain, UM_RESTORE, MPVOID, MPVOID);
|
---|
1116 | }
|
---|
1117 | }
|
---|
1118 | }
|
---|
1119 | }
|
---|
1120 | PrfWriteProfileData(fmprof, appname, "SyncUpdates",
|
---|
1121 | &fSyncUpdates, sizeof(BOOL));
|
---|
1122 | if (!(ulCnrType & (CCS_EXTENDSEL | CCS_MULTIPLESEL)))
|
---|
1123 | saymsg(MB_ENTER | MB_ICONEXCLAMATION,
|
---|
1124 | HWND_DESKTOP,
|
---|
1125 | GetPString(IDS_WARNINGTEXT),
|
---|
1126 | GetPString(IDS_SELECTTYPEERRORTEXT));
|
---|
1127 | break;
|
---|
1128 | }
|
---|
1129 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
1130 | }
|
---|
1131 |
|
---|
1132 | MRESULT EXPENTRY CfgMDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
1133 | {
|
---|
1134 | switch (msg) {
|
---|
1135 | case WM_INITDLG:
|
---|
1136 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1137 | break;
|
---|
1138 |
|
---|
1139 | case UM_UNDO:
|
---|
1140 | WinCheckButton(hwnd, CFGM_EXTERNALINIS, fExternalINIs);
|
---|
1141 | WinCheckButton(hwnd, CFGM_EXTERNALARCBOXES, fExternalArcboxes);
|
---|
1142 | WinCheckButton(hwnd, CFGM_EXTERNALVIEWER, fExternalViewer);
|
---|
1143 | WinCheckButton(hwnd, CFGM_EXTERNALCOLLECTOR, fExternalCollector);
|
---|
1144 | WinCheckButton(hwnd, CFGM_SAVESTATE, fSaveState);
|
---|
1145 | WinCheckButton(hwnd, CFGM_AUTOTILE, (fAutoTile));
|
---|
1146 | WinCheckButton(hwnd, CFGM_FREETREE, (fFreeTree));
|
---|
1147 | WinCheckButton(hwnd, CFGM_SPLITSTATUS, (fSplitStatus));
|
---|
1148 | WinCheckButton(hwnd, CFGM_NOTREEGAP, (fNoTreeGap));
|
---|
1149 | WinCheckButton(hwnd, CFGM_STARTMIN, (fStartMinimized));
|
---|
1150 | WinCheckButton(hwnd, CFGM_STARTMAX, (fStartMaximized));
|
---|
1151 | WinCheckButton(hwnd, CFGM_DATAMIN, (fDataMin));
|
---|
1152 | WinCheckButton(hwnd, CFGM_TILEBACKWARDS, (fTileBackwards));
|
---|
1153 | {
|
---|
1154 | long th;
|
---|
1155 |
|
---|
1156 | th = (fAutoAddDirs && fAutoAddAllDirs) ? 2 : (fAutoAddDirs) ? 1 : 0;
|
---|
1157 | WinCheckButton(hwnd, CFGM_RECENTDIRS, th);
|
---|
1158 | WinSendMsg(hwnd, UM_RESTORE, MPFROM2SHORT(CFGM_RECENTDIRS, 0), MPVOID);
|
---|
1159 | }
|
---|
1160 | WinCheckButton(hwnd, CFGM_USERLISTSWITCHES, fUserListSwitches);
|
---|
1161 | WinCheckButton(hwnd, CFGM_WSANIMATE, (fwsAnimate != 0));
|
---|
1162 | WinCheckButton(hwnd, CFGM_SEPARATEPARMS, fSeparateParms);
|
---|
1163 | WinCheckButton(hwnd, CFGM_BLUELED, fBlueLED);
|
---|
1164 | WinCheckButton(hwnd, CFGM_SHOWTARGET, fShowTarget);
|
---|
1165 | WinEnableWindow(WinWindowFromID(hwnd, CFGM_STARTMAX), !(fStartMinimized));
|
---|
1166 | WinEnableWindow(WinWindowFromID(hwnd, CFGM_STARTMIN), !(fStartMaximized));
|
---|
1167 | return 0;
|
---|
1168 |
|
---|
1169 | case UM_RESTORE:
|
---|
1170 | {
|
---|
1171 | long test;
|
---|
1172 | BOOL th, oh;
|
---|
1173 | char s[80];
|
---|
1174 |
|
---|
1175 | test = WinQueryButtonCheckstate(hwnd, SHORT1FROMMP(mp1));
|
---|
1176 | th = (test != 0);
|
---|
1177 | oh = (test == 1);
|
---|
1178 | *s = 0;
|
---|
1179 | switch (SHORT1FROMMP(mp1)) {
|
---|
1180 | case CFGM_RECENTDIRS:
|
---|
1181 | sprintf(s,
|
---|
1182 | GetPString(IDS_RECENTHELPWHICHTEXT),
|
---|
1183 | (!oh && th) ?
|
---|
1184 | GetPString(IDS_RECENTONLYTEXT) :
|
---|
1185 | (oh && th) ?
|
---|
1186 | GetPString(IDS_ALLONLYTEXT) : GetPString(IDS_NONE));
|
---|
1187 | break;
|
---|
1188 | }
|
---|
1189 | if (*s)
|
---|
1190 | WinSetDlgItemText(hwnd, SHORT1FROMMP(mp1), s);
|
---|
1191 | }
|
---|
1192 | return 0;
|
---|
1193 |
|
---|
1194 | case WM_CONTROL:
|
---|
1195 | switch (SHORT1FROMMP(mp1)) {
|
---|
1196 | case CFGM_RECENTDIRS:
|
---|
1197 | WinSendMsg(hwnd, UM_RESTORE, mp1, MPVOID);
|
---|
1198 | break;
|
---|
1199 | case CFGM_STARTMIN:
|
---|
1200 | if (WinQueryButtonCheckstate(hwnd, CFGM_STARTMIN)) {
|
---|
1201 | WinCheckButton(hwnd, CFGM_STARTMAX, FALSE);
|
---|
1202 | WinEnableWindow(WinWindowFromID(hwnd, CFGM_STARTMAX), FALSE);
|
---|
1203 | }
|
---|
1204 | else
|
---|
1205 | WinEnableWindow(WinWindowFromID(hwnd, CFGM_STARTMAX), TRUE);
|
---|
1206 | break;
|
---|
1207 | case CFGM_STARTMAX:
|
---|
1208 | if (WinQueryButtonCheckstate(hwnd, CFGM_STARTMAX)) {
|
---|
1209 | WinCheckButton(hwnd, CFGM_STARTMIN, FALSE);
|
---|
1210 | WinEnableWindow(WinWindowFromID(hwnd, CFGM_STARTMIN), FALSE);
|
---|
1211 | }
|
---|
1212 | else
|
---|
1213 | WinEnableWindow(WinWindowFromID(hwnd, CFGM_STARTMIN), TRUE);
|
---|
1214 | break;
|
---|
1215 | }
|
---|
1216 | return 0;
|
---|
1217 |
|
---|
1218 | case WM_COMMAND:
|
---|
1219 | switch (SHORT1FROMMP(mp1)) {
|
---|
1220 | case IDM_UNDO:
|
---|
1221 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1222 | break;
|
---|
1223 |
|
---|
1224 | case DID_CANCEL:
|
---|
1225 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1226 |
|
---|
1227 | case DID_OK:
|
---|
1228 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
1229 | break;
|
---|
1230 |
|
---|
1231 | case IDM_HELP:
|
---|
1232 | if (hwndHelp)
|
---|
1233 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
1234 | MPFROM2SHORT(HELP_CFGM, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
1235 | break;
|
---|
1236 | }
|
---|
1237 | return 0;
|
---|
1238 |
|
---|
1239 | case WM_CLOSE:
|
---|
1240 | if (hwndMain && !strcmp(realappname, FM3Str)) {
|
---|
1241 | if (fFreeTree != WinQueryButtonCheckstate(hwnd, CFGM_FREETREE))
|
---|
1242 | PostMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_FREETREE, 0), MPVOID);
|
---|
1243 | if (fAutoTile != WinQueryButtonCheckstate(hwnd, CFGM_AUTOTILE))
|
---|
1244 | PostMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_AUTOTILE, 0), MPVOID);
|
---|
1245 | if (fSplitStatus != WinQueryButtonCheckstate(hwnd, CFGM_SPLITSTATUS)) {
|
---|
1246 | fSplitStatus = (fSplitStatus) ? FALSE : TRUE;
|
---|
1247 | PostMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_BLINK, 0), MPVOID);
|
---|
1248 | PrfWriteProfileData(fmprof, FM3Str, "SplitStatus", &fSplitStatus,
|
---|
1249 | sizeof(BOOL));
|
---|
1250 | }
|
---|
1251 | }
|
---|
1252 | fUserListSwitches = WinQueryButtonCheckstate(hwnd, CFGM_USERLISTSWITCHES);
|
---|
1253 | PrfWriteProfileData(fmprof, FM3Str, "UserListSwitches",
|
---|
1254 | (PVOID) & fUserListSwitches, sizeof(BOOL));
|
---|
1255 | fExternalINIs = WinQueryButtonCheckstate(hwnd, CFGM_EXTERNALINIS);
|
---|
1256 | PrfWriteProfileData(fmprof, FM3Str, "ExternalINIs",
|
---|
1257 | (PVOID) & fExternalINIs, sizeof(BOOL));
|
---|
1258 | fExternalArcboxes = WinQueryButtonCheckstate(hwnd, CFGM_EXTERNALARCBOXES);
|
---|
1259 | PrfWriteProfileData(fmprof, FM3Str, "ExternalArcboxes",
|
---|
1260 | (PVOID) & fExternalArcboxes, sizeof(BOOL));
|
---|
1261 | fExternalCollector =
|
---|
1262 | WinQueryButtonCheckstate(hwnd, CFGM_EXTERNALCOLLECTOR);
|
---|
1263 | PrfWriteProfileData(fmprof, FM3Str, "ExternalCollector",
|
---|
1264 | (PVOID) & fExternalCollector, sizeof(BOOL));
|
---|
1265 | fExternalViewer = WinQueryButtonCheckstate(hwnd, CFGM_EXTERNALVIEWER);
|
---|
1266 | PrfWriteProfileData(fmprof, FM3Str, "ExternalViewer",
|
---|
1267 | (PVOID) & fExternalViewer, sizeof(BOOL));
|
---|
1268 | {
|
---|
1269 | long test;
|
---|
1270 |
|
---|
1271 | test = WinQueryButtonCheckstate(hwnd, CFGM_RECENTDIRS);
|
---|
1272 | fAutoAddDirs = (test != 0);
|
---|
1273 | fAutoAddAllDirs = (test == 2);
|
---|
1274 | }
|
---|
1275 | PrfWriteProfileData(fmprof,
|
---|
1276 | appname,
|
---|
1277 | "AutoAddDirs", (PVOID) & fAutoAddDirs, sizeof(BOOL));
|
---|
1278 | PrfWriteProfileData(fmprof,
|
---|
1279 | appname,
|
---|
1280 | "AutoAddAllDirs",
|
---|
1281 | (PVOID) & fAutoAddAllDirs, sizeof(BOOL));
|
---|
1282 | fwsAnimate = WinQueryButtonCheckstate(hwnd, CFGM_WSANIMATE);
|
---|
1283 | if (fwsAnimate)
|
---|
1284 | fwsAnimate = WS_ANIMATE;
|
---|
1285 | PrfWriteProfileData(fmprof,
|
---|
1286 | appname,
|
---|
1287 | "WS_ANIMATE", (PVOID) & fwsAnimate, sizeof(ULONG));
|
---|
1288 | fSaveState = WinQueryButtonCheckstate(hwnd, CFGM_SAVESTATE);
|
---|
1289 | PrfWriteProfileData(fmprof,
|
---|
1290 | FM3Str,
|
---|
1291 | "SaveState", (PVOID) & fSaveState, sizeof(BOOL));
|
---|
1292 | fStartMinimized = WinQueryButtonCheckstate(hwnd, CFGM_STARTMIN);
|
---|
1293 | PrfWriteProfileData(fmprof,
|
---|
1294 | appname,
|
---|
1295 | "StartMinimized",
|
---|
1296 | (PVOID) & fStartMinimized, sizeof(BOOL));
|
---|
1297 | fStartMaximized = WinQueryButtonCheckstate(hwnd, CFGM_STARTMAX);
|
---|
1298 | PrfWriteProfileData(fmprof,
|
---|
1299 | appname,
|
---|
1300 | "StartMaximized",
|
---|
1301 | (PVOID) & fStartMaximized, sizeof(BOOL));
|
---|
1302 | fDataMin = WinQueryButtonCheckstate(hwnd, CFGM_DATAMIN);
|
---|
1303 | PrfWriteProfileData(fmprof,
|
---|
1304 | FM3Str, "DataMin", (PVOID) & fDataMin, sizeof(BOOL));
|
---|
1305 | fTileBackwards = WinQueryButtonCheckstate(hwnd, CFGM_TILEBACKWARDS);
|
---|
1306 | PrfWriteProfileData(fmprof,
|
---|
1307 | FM3Str,
|
---|
1308 | "TileBackwards",
|
---|
1309 | (PVOID) & fTileBackwards, sizeof(BOOL));
|
---|
1310 | fNoTreeGap = WinQueryButtonCheckstate(hwnd, CFGM_NOTREEGAP);
|
---|
1311 | PrfWriteProfileData(fmprof,
|
---|
1312 | FM3Str,
|
---|
1313 | "NoTreeGap", (PVOID) & fNoTreeGap, sizeof(BOOL));
|
---|
1314 | fBlueLED = WinQueryButtonCheckstate(hwnd, CFGM_BLUELED);
|
---|
1315 | PrfWriteProfileData(fmprof,
|
---|
1316 | appname, "BlueLED", (PVOID) & fBlueLED, sizeof(BOOL));
|
---|
1317 | {
|
---|
1318 | BOOL dummy;
|
---|
1319 |
|
---|
1320 | dummy = WinQueryButtonCheckstate(hwnd, CFGM_SHOWTARGET);
|
---|
1321 | if (dummy != fShowTarget) {
|
---|
1322 | fShowTarget = dummy;
|
---|
1323 | PrfWriteProfileData(fmprof,
|
---|
1324 | appname,
|
---|
1325 | "ShowTarget",
|
---|
1326 | (PVOID) & fShowTarget, sizeof(BOOL));
|
---|
1327 | if (hwndMain)
|
---|
1328 | PostMsg(WinQueryWindow(hwndMain, QW_PARENT),
|
---|
1329 | WM_UPDATEFRAME, MPFROMLONG(FCF_SIZEBORDER), MPVOID);
|
---|
1330 | SetTargetDir(hwnd, TRUE);
|
---|
1331 | }
|
---|
1332 | dummy = WinQueryButtonCheckstate(hwnd, CFGM_SEPARATEPARMS);
|
---|
1333 | if (dummy != fSeparateParms) {
|
---|
1334 | fSeparateParms = dummy;
|
---|
1335 | PrfWriteProfileData(fmprof,
|
---|
1336 | FM3Str,
|
---|
1337 | "SeparateParms",
|
---|
1338 | (PVOID) & fSeparateParms, sizeof(BOOL));
|
---|
1339 | WinSendMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER),
|
---|
1340 | UM_UNDO, MPVOID, MPVOID);
|
---|
1341 | }
|
---|
1342 | }
|
---|
1343 | break;
|
---|
1344 | }
|
---|
1345 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
1346 | }
|
---|
1347 |
|
---|
1348 | MRESULT EXPENTRY Cfg5DlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
1349 | {
|
---|
1350 | static MASK mask;
|
---|
1351 |
|
---|
1352 | switch (msg) {
|
---|
1353 | case WM_INITDLG:
|
---|
1354 | WinSendDlgItemMsg(hwnd, CFG5_SUBJECTDISPLAYWIDTH, SPBM_SETTEXTLIMIT,
|
---|
1355 | MPFROMSHORT(8), MPVOID);
|
---|
1356 | WinSendDlgItemMsg(hwnd, CFG5_SUBJECTDISPLAYWIDTH, SPBM_OVERRIDESETLIMITS,
|
---|
1357 | MPFROMLONG(1000), MPFROMLONG(50));
|
---|
1358 | WinSendDlgItemMsg(hwnd,
|
---|
1359 | CFG5_FILTER,
|
---|
1360 | EM_SETTEXTLIMIT, MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
1361 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1362 | break;
|
---|
1363 |
|
---|
1364 | case UM_FOCUSME:
|
---|
1365 | WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, CFG5_MINIICONS));
|
---|
1366 | return 0;
|
---|
1367 |
|
---|
1368 | case UM_UNDO:
|
---|
1369 | {
|
---|
1370 | ULONG flWindowAttr = 0, size = sizeof(ULONG);
|
---|
1371 |
|
---|
1372 | if (!PrfQueryProfileData(fmprof,
|
---|
1373 | appname,
|
---|
1374 | "DirflWindowAttr", &flWindowAttr, &size))
|
---|
1375 | flWindowAttr = (CV_NAME | CV_MINI | CA_DETAILSVIEWTITLES | CV_FLOW);
|
---|
1376 | if (flWindowAttr & CV_ICON)
|
---|
1377 | WinCheckButton(hwnd, CFG5_ICON, TRUE);
|
---|
1378 | if (flWindowAttr & CV_NAME)
|
---|
1379 | WinCheckButton(hwnd, CFG5_NAME, TRUE);
|
---|
1380 | if (flWindowAttr & CV_TEXT)
|
---|
1381 | WinCheckButton(hwnd, CFG5_TEXT, TRUE);
|
---|
1382 | if (flWindowAttr & CV_DETAIL)
|
---|
1383 | WinCheckButton(hwnd, CFG5_DETAIL, TRUE);
|
---|
1384 | if (flWindowAttr & CV_MINI)
|
---|
1385 | WinCheckButton(hwnd, CFG5_MINIICONS, TRUE);
|
---|
1386 | if (flWindowAttr & CA_DETAILSVIEWTITLES)
|
---|
1387 | WinCheckButton(hwnd, CFG5_SHOWTITLES, TRUE);
|
---|
1388 | WinCheckButton(hwnd, CFG5_SHOWLNAMES, detailslongname);
|
---|
1389 | WinCheckButton(hwnd, CFG5_SHOWSUBJECT, detailssubject);
|
---|
1390 | WinCheckButton(hwnd, CFG5_SHOWEAS, detailsea);
|
---|
1391 | WinCheckButton(hwnd, CFG5_SHOWSIZE, detailssize);
|
---|
1392 | WinCheckButton(hwnd, CFG5_SHOWICON, detailsicon);
|
---|
1393 | WinCheckButton(hwnd, CFG5_SHOWLWDATE, detailslwdate);
|
---|
1394 | WinCheckButton(hwnd, CFG5_SHOWLWTIME, detailslwtime);
|
---|
1395 | WinCheckButton(hwnd, CFG5_SHOWLADATE, detailsladate);
|
---|
1396 | WinCheckButton(hwnd, CFG5_SHOWLATIME, detailslatime);
|
---|
1397 | WinCheckButton(hwnd, CFG5_SHOWCRDATE, detailscrdate);
|
---|
1398 | WinCheckButton(hwnd, CFG5_SHOWCRTIME, detailscrtime);
|
---|
1399 | WinCheckButton(hwnd, CFG5_SHOWATTR, detailsattr);
|
---|
1400 | memset(&mask, 0, sizeof(mask));
|
---|
1401 | mask.attrFile = FILE_DIRECTORY | FILE_ARCHIVED | FILE_HIDDEN |
|
---|
1402 | FILE_SYSTEM | FILE_NORMAL | FILE_READONLY;
|
---|
1403 | size = sizeof(MASK);
|
---|
1404 | if (PrfQueryProfileData(fmprof, appname, "DirFilter", &mask, &size))
|
---|
1405 | SetMask(NULL, &mask);
|
---|
1406 | if (!mask.attrFile)
|
---|
1407 | mask.attrFile = FILE_DIRECTORY | FILE_ARCHIVED | FILE_HIDDEN |
|
---|
1408 | FILE_SYSTEM | FILE_NORMAL | FILE_READONLY;
|
---|
1409 | strcpy(mask.prompt, GetPString(IDS_DEFDIRFILTERTITLETEXT));
|
---|
1410 | WinSetDlgItemText(hwnd, CFG5_FILTER, mask.szMask);
|
---|
1411 | WinCheckButton(hwnd, CFG5_SUBJECTINLEFTPANE, fSubjectInLeftPane);
|
---|
1412 | WinCheckButton(hwnd, CFG5_SUBJECTLENGTHMAX, fSubjectLengthMax);
|
---|
1413 | WinSendDlgItemMsg(hwnd, CFG5_SUBJECTDISPLAYWIDTH, SPBM_SETCURRENTVALUE,
|
---|
1414 | MPFROMLONG(SubjectDisplayWidth), MPVOID);
|
---|
1415 | }
|
---|
1416 | return 0;
|
---|
1417 |
|
---|
1418 | case UM_SETUP5:
|
---|
1419 | if (WinDlgBox(HWND_DESKTOP, hwndNotebook, PickMaskDlgProc,
|
---|
1420 | FM3ModHandle, MSK_FRAME, MPFROMP(&mask))) {
|
---|
1421 | SetMask(NULL, &mask);
|
---|
1422 | WinSetDlgItemText(hwnd, CFG5_FILTER, mask.szMask);
|
---|
1423 | }
|
---|
1424 | return 0;
|
---|
1425 |
|
---|
1426 | case WM_CONTROL:
|
---|
1427 | switch (SHORT1FROMMP(mp1)) {
|
---|
1428 | case CFG5_FILTER:
|
---|
1429 | switch (SHORT2FROMMP(mp1)) {
|
---|
1430 | case EN_SETFOCUS:
|
---|
1431 | PostMsg(hwnd, UM_FOCUSME, MPVOID, MPVOID);
|
---|
1432 | PostMsg(hwnd, UM_SETUP5, MPVOID, MPVOID);
|
---|
1433 | break;
|
---|
1434 | }
|
---|
1435 | break;
|
---|
1436 | }
|
---|
1437 | return 0;
|
---|
1438 |
|
---|
1439 | case WM_COMMAND:
|
---|
1440 | switch (SHORT1FROMMP(mp1)) {
|
---|
1441 | case IDM_UNDO:
|
---|
1442 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1443 | break;
|
---|
1444 |
|
---|
1445 | case DID_CANCEL:
|
---|
1446 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1447 |
|
---|
1448 | case DID_OK:
|
---|
1449 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
1450 | break;
|
---|
1451 |
|
---|
1452 | case IDM_HELP:
|
---|
1453 | if (hwndHelp)
|
---|
1454 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
1455 | MPFROM2SHORT(HELP_CFG5, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
1456 | break;
|
---|
1457 | }
|
---|
1458 | return 0;
|
---|
1459 |
|
---|
1460 | case WM_CLOSE:
|
---|
1461 | {
|
---|
1462 | ULONG flWindowAttr = 0;
|
---|
1463 |
|
---|
1464 | if (WinQueryButtonCheckstate(hwnd, CFG5_ICON))
|
---|
1465 | flWindowAttr |= CV_ICON;
|
---|
1466 | if (WinQueryButtonCheckstate(hwnd, CFG5_NAME))
|
---|
1467 | flWindowAttr |= CV_NAME;
|
---|
1468 | if (WinQueryButtonCheckstate(hwnd, CFG5_TEXT))
|
---|
1469 | flWindowAttr |= CV_TEXT;
|
---|
1470 | if (WinQueryButtonCheckstate(hwnd, CFG5_DETAIL))
|
---|
1471 | flWindowAttr |= CV_DETAIL;
|
---|
1472 | if (WinQueryButtonCheckstate(hwnd, CFG5_MINIICONS))
|
---|
1473 | flWindowAttr |= CV_MINI;
|
---|
1474 | if (WinQueryButtonCheckstate(hwnd, CFG5_SHOWTITLES))
|
---|
1475 | flWindowAttr |= CA_DETAILSVIEWTITLES;
|
---|
1476 | flWindowAttr |= CV_FLOW;
|
---|
1477 | PrfWriteProfileData(fmprof,
|
---|
1478 | appname,
|
---|
1479 | "DirflWindowAttr", &flWindowAttr, sizeof(ULONG));
|
---|
1480 | }
|
---|
1481 | detailslongname = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLNAMES);
|
---|
1482 | PrfWriteProfileData(fmprof, appname, "DetailsLongname",
|
---|
1483 | &detailslongname, sizeof(BOOL));
|
---|
1484 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLongname",
|
---|
1485 | &detailslongname, sizeof(BOOL));
|
---|
1486 | detailssubject = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT);
|
---|
1487 | PrfWriteProfileData(fmprof, appname, "DetailsSubject",
|
---|
1488 | &detailssubject, sizeof(BOOL));
|
---|
1489 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSubject",
|
---|
1490 | &detailssubject, sizeof(BOOL));
|
---|
1491 | detailsea = WinQueryButtonCheckstate(hwnd, CFG5_SHOWEAS);
|
---|
1492 | PrfWriteProfileData(fmprof, appname, "DetailsEA",
|
---|
1493 | &detailsea, sizeof(BOOL));
|
---|
1494 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsEA",
|
---|
1495 | &detailsea, sizeof(BOOL));
|
---|
1496 | detailssize = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSIZE);
|
---|
1497 | PrfWriteProfileData(fmprof, appname, "DetailsSize",
|
---|
1498 | &detailssize, sizeof(BOOL));
|
---|
1499 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSize",
|
---|
1500 | &detailssize, sizeof(BOOL));
|
---|
1501 | detailsicon = WinQueryButtonCheckstate(hwnd, CFG5_SHOWICON);
|
---|
1502 | PrfWriteProfileData(fmprof, appname, "DetailsIcon",
|
---|
1503 | &detailsicon, sizeof(BOOL));
|
---|
1504 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsIcon",
|
---|
1505 | &detailsicon, sizeof(BOOL));
|
---|
1506 | detailslwdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWDATE);
|
---|
1507 | PrfWriteProfileData(fmprof, appname, "DetailsLWDate",
|
---|
1508 | &detailslwdate, sizeof(BOOL));
|
---|
1509 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWDate",
|
---|
1510 | &detailslwdate, sizeof(BOOL));
|
---|
1511 | detailslwtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWTIME);
|
---|
1512 | PrfWriteProfileData(fmprof, appname, "DetailsLWTime",
|
---|
1513 | &detailslwtime, sizeof(BOOL));
|
---|
1514 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWTime",
|
---|
1515 | &detailslwtime, sizeof(BOOL));
|
---|
1516 | detailsladate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLADATE);
|
---|
1517 | PrfWriteProfileData(fmprof, appname, "DetailsLADate",
|
---|
1518 | &detailsladate, sizeof(BOOL));
|
---|
1519 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLADate",
|
---|
1520 | &detailsladate, sizeof(BOOL));
|
---|
1521 | detailslatime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLATIME);
|
---|
1522 | PrfWriteProfileData(fmprof, appname, "DetailsLATime",
|
---|
1523 | &detailslatime, sizeof(BOOL));
|
---|
1524 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLATime",
|
---|
1525 | &detailslatime, sizeof(BOOL));
|
---|
1526 | detailscrdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRDATE);
|
---|
1527 | PrfWriteProfileData(fmprof, appname, "DetailsCRDate",
|
---|
1528 | &detailscrdate, sizeof(BOOL));
|
---|
1529 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRDate",
|
---|
1530 | &detailscrdate, sizeof(BOOL));
|
---|
1531 | detailscrtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRTIME);
|
---|
1532 | PrfWriteProfileData(fmprof, appname, "DetailsCRTime",
|
---|
1533 | &detailscrtime, sizeof(BOOL));
|
---|
1534 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRTime",
|
---|
1535 | &detailscrtime, sizeof(BOOL));
|
---|
1536 | detailsattr = WinQueryButtonCheckstate(hwnd, CFG5_SHOWATTR);
|
---|
1537 | PrfWriteProfileData(fmprof, appname, "DetailsAttr",
|
---|
1538 | &detailsattr, sizeof(BOOL));
|
---|
1539 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr",
|
---|
1540 | &detailsattr, sizeof(BOOL));
|
---|
1541 | fSubjectInLeftPane = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTINLEFTPANE);
|
---|
1542 | PrfWriteProfileData(fmprof, appname, "SubjectInLeftPane",
|
---|
1543 | &fSubjectInLeftPane, sizeof(BOOL));
|
---|
1544 | PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectInLeftPane",
|
---|
1545 | &fSubjectInLeftPane, sizeof(BOOL));
|
---|
1546 | fSubjectLengthMax = WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX);
|
---|
1547 | PrfWriteProfileData(fmprof, appname, "SubjectLengthMax",
|
---|
1548 | &fSubjectInLeftPane, sizeof(BOOL));
|
---|
1549 | PrfWriteProfileData(fmprof, appname, "DirCnr.SubjectLengthMax",
|
---|
1550 | &fSubjectInLeftPane, sizeof(BOOL));
|
---|
1551 | *mask.prompt = 0;
|
---|
1552 | PrfWriteProfileData(fmprof, appname, "DirFilter", &mask, sizeof(MASK));
|
---|
1553 | {
|
---|
1554 | if (!WinQueryButtonCheckstate(hwnd, CFG5_SUBJECTLENGTHMAX)) {
|
---|
1555 | WinSendDlgItemMsg(hwnd, CFG5_SUBJECTDISPLAYWIDTH, SPBM_QUERYVALUE,
|
---|
1556 | MPFROMP(&SubjectDisplayWidth), MPFROM2SHORT(0, SPBQ_DONOTUPDATE));
|
---|
1557 | if (SubjectDisplayWidth < 50)
|
---|
1558 | SubjectDisplayWidth = 0;
|
---|
1559 | else if (SubjectDisplayWidth > 1000)
|
---|
1560 | SubjectDisplayWidth = 1000;
|
---|
1561 | }
|
---|
1562 | else
|
---|
1563 | SubjectDisplayWidth = 0;
|
---|
1564 | PrfWriteProfileData(fmprof,
|
---|
1565 | appname, "SubjectDisplayWidth",
|
---|
1566 | &SubjectDisplayWidth, sizeof(ULONG));
|
---|
1567 | PrfWriteProfileData(fmprof,
|
---|
1568 | appname, "DirCnr.SubjectDisplayWidth",
|
---|
1569 | &SubjectDisplayWidth, sizeof(ULONG));
|
---|
1570 | }
|
---|
1571 | break;
|
---|
1572 | }
|
---|
1573 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
1574 | }
|
---|
1575 |
|
---|
1576 | MRESULT EXPENTRY Cfg6DlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
1577 | {
|
---|
1578 | switch (msg) {
|
---|
1579 | case WM_INITDLG:
|
---|
1580 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1581 | break;
|
---|
1582 |
|
---|
1583 | case UM_UNDO:
|
---|
1584 | WinCheckButton(hwnd, CFG6_SORTFIRST, FALSE);
|
---|
1585 | WinCheckButton(hwnd, CFG6_SORTLAST, FALSE);
|
---|
1586 | WinCheckButton(hwnd, CFG6_SORTSIZE, FALSE);
|
---|
1587 | WinCheckButton(hwnd, CFG6_SORTEASIZE, FALSE);
|
---|
1588 | WinCheckButton(hwnd, CFG6_SORTLWDATE, FALSE);
|
---|
1589 | WinCheckButton(hwnd, CFG6_SORTLADATE, FALSE);
|
---|
1590 | WinCheckButton(hwnd, CFG6_SORTCRDATE, FALSE);
|
---|
1591 | WinCheckButton(hwnd, CFG6_SORTNAME, FALSE);
|
---|
1592 | WinCheckButton(hwnd, CFG6_SORTDIRSFIRST, FALSE);
|
---|
1593 | WinCheckButton(hwnd, CFG6_SORTDIRSLAST, FALSE);
|
---|
1594 | WinCheckButton(hwnd, CFG6_SORTREVERSE, FALSE);
|
---|
1595 | if (sortFlags & SORT_FIRSTEXTENSION)
|
---|
1596 | WinCheckButton(hwnd, CFG6_SORTFIRST, TRUE);
|
---|
1597 | else if (sortFlags & SORT_LASTEXTENSION)
|
---|
1598 | WinCheckButton(hwnd, CFG6_SORTLAST, TRUE);
|
---|
1599 | else if (sortFlags & SORT_SIZE)
|
---|
1600 | WinCheckButton(hwnd, CFG6_SORTSIZE, TRUE);
|
---|
1601 | else if (sortFlags & SORT_EASIZE)
|
---|
1602 | WinCheckButton(hwnd, CFG6_SORTEASIZE, TRUE);
|
---|
1603 | else if (sortFlags & SORT_LWDATE)
|
---|
1604 | WinCheckButton(hwnd, CFG6_SORTLWDATE, TRUE);
|
---|
1605 | else if (sortFlags & SORT_LADATE)
|
---|
1606 | WinCheckButton(hwnd, CFG6_SORTLADATE, TRUE);
|
---|
1607 | else if (sortFlags & SORT_CRDATE)
|
---|
1608 | WinCheckButton(hwnd, CFG6_SORTCRDATE, TRUE);
|
---|
1609 | else if (sortFlags & SORT_FILENAME)
|
---|
1610 | WinCheckButton(hwnd, CFG6_SORTFILENAME, TRUE);
|
---|
1611 | else
|
---|
1612 | WinCheckButton(hwnd, CFG6_SORTNAME, TRUE);
|
---|
1613 | if (sortFlags & SORT_DIRSFIRST)
|
---|
1614 | WinCheckButton(hwnd, CFG6_SORTDIRSFIRST, TRUE);
|
---|
1615 | else if (sortFlags & SORT_DIRSLAST)
|
---|
1616 | WinCheckButton(hwnd, CFG6_SORTDIRSLAST, TRUE);
|
---|
1617 | if (sortFlags & SORT_REVERSE)
|
---|
1618 | WinCheckButton(hwnd, CFG6_SORTREVERSE, TRUE);
|
---|
1619 | return 0;
|
---|
1620 |
|
---|
1621 | case WM_CONTROL:
|
---|
1622 | switch (SHORT1FROMMP(mp1)) {
|
---|
1623 | case CFG6_SORTDIRSFIRST:
|
---|
1624 | case CFG6_SORTDIRSLAST:
|
---|
1625 | {
|
---|
1626 | BOOL temp;
|
---|
1627 |
|
---|
1628 | temp = WinQueryButtonCheckstate(hwnd, SHORT1FROMMP(mp1));
|
---|
1629 | if (temp) {
|
---|
1630 | switch (SHORT1FROMMP(mp1)) {
|
---|
1631 | case CFG6_SORTDIRSFIRST:
|
---|
1632 | WinCheckButton(hwnd, CFG6_SORTDIRSLAST, FALSE);
|
---|
1633 | break;
|
---|
1634 | case CFG6_SORTDIRSLAST:
|
---|
1635 | WinCheckButton(hwnd, CFG6_SORTDIRSFIRST, FALSE);
|
---|
1636 | break;
|
---|
1637 | }
|
---|
1638 | }
|
---|
1639 | }
|
---|
1640 | break;
|
---|
1641 | }
|
---|
1642 | return 0;
|
---|
1643 |
|
---|
1644 | case WM_COMMAND:
|
---|
1645 | switch (SHORT1FROMMP(mp1)) {
|
---|
1646 | case IDM_UNDO:
|
---|
1647 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1648 | break;
|
---|
1649 |
|
---|
1650 | case DID_CANCEL:
|
---|
1651 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1652 |
|
---|
1653 | case DID_OK:
|
---|
1654 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
1655 | break;
|
---|
1656 |
|
---|
1657 | case IDM_HELP:
|
---|
1658 | if (hwndHelp)
|
---|
1659 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
1660 | MPFROM2SHORT(HELP_CFG6, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
1661 | break;
|
---|
1662 | }
|
---|
1663 | return 0;
|
---|
1664 |
|
---|
1665 | case WM_CLOSE:
|
---|
1666 | sortFlags = 0;
|
---|
1667 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTFILENAME))
|
---|
1668 | sortFlags |= SORT_FILENAME;
|
---|
1669 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTSIZE))
|
---|
1670 | sortFlags |= SORT_SIZE;
|
---|
1671 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTEASIZE))
|
---|
1672 | sortFlags |= SORT_EASIZE;
|
---|
1673 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTFIRST))
|
---|
1674 | sortFlags |= SORT_FIRSTEXTENSION;
|
---|
1675 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLAST))
|
---|
1676 | sortFlags |= SORT_LASTEXTENSION;
|
---|
1677 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLWDATE))
|
---|
1678 | sortFlags |= SORT_LWDATE;
|
---|
1679 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLADATE))
|
---|
1680 | sortFlags |= SORT_LADATE;
|
---|
1681 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTCRDATE))
|
---|
1682 | sortFlags |= SORT_CRDATE;
|
---|
1683 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTDIRSFIRST))
|
---|
1684 | sortFlags |= SORT_DIRSFIRST;
|
---|
1685 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTDIRSLAST))
|
---|
1686 | sortFlags |= SORT_DIRSLAST;
|
---|
1687 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTREVERSE))
|
---|
1688 | sortFlags |= SORT_REVERSE;
|
---|
1689 | PrfWriteProfileData(fmprof, appname, "Sort", &sortFlags, sizeof(INT));
|
---|
1690 | break;
|
---|
1691 | }
|
---|
1692 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
1693 | }
|
---|
1694 |
|
---|
1695 | MRESULT EXPENTRY Cfg7DlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
1696 | {
|
---|
1697 | static MASK mask;
|
---|
1698 |
|
---|
1699 | switch (msg) {
|
---|
1700 | case WM_INITDLG:
|
---|
1701 | WinSendDlgItemMsg(hwnd, CFG5_FILTER, EM_SETTEXTLIMIT,
|
---|
1702 | MPFROM2SHORT(CCHMAXPATH, 0), MPVOID);
|
---|
1703 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1704 | break;
|
---|
1705 |
|
---|
1706 | case UM_FOCUSME:
|
---|
1707 | WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, CFG5_MINIICONS));
|
---|
1708 | return 0;
|
---|
1709 |
|
---|
1710 | case UM_UNDO:
|
---|
1711 | WinCheckButton(hwnd, CFG5_EXTERNALCOLLECTOR, fExternalCollector);
|
---|
1712 | {
|
---|
1713 | ULONG flWindowAttr = 0, size = sizeof(ULONG);
|
---|
1714 |
|
---|
1715 | if (!PrfQueryProfileData(fmprof,
|
---|
1716 | appname,
|
---|
1717 | "CollectorflWindowAttr", &flWindowAttr, &size))
|
---|
1718 | flWindowAttr = (CV_NAME | CA_DETAILSVIEWTITLES | CV_MINI | CV_FLOW);
|
---|
1719 | if (flWindowAttr & CV_ICON)
|
---|
1720 | WinCheckButton(hwnd, CFG5_ICON, TRUE);
|
---|
1721 | if (flWindowAttr & CV_NAME)
|
---|
1722 | WinCheckButton(hwnd, CFG5_NAME, TRUE);
|
---|
1723 | if (flWindowAttr & CV_TEXT)
|
---|
1724 | WinCheckButton(hwnd, CFG5_TEXT, TRUE);
|
---|
1725 | if (flWindowAttr & CV_DETAIL)
|
---|
1726 | WinCheckButton(hwnd, CFG5_DETAIL, TRUE);
|
---|
1727 | if (flWindowAttr & CV_MINI)
|
---|
1728 | WinCheckButton(hwnd, CFG5_MINIICONS, TRUE);
|
---|
1729 | if (flWindowAttr & CA_DETAILSVIEWTITLES)
|
---|
1730 | WinCheckButton(hwnd, CFG5_SHOWTITLES, TRUE);
|
---|
1731 | memset(&mask, 0, sizeof(mask));
|
---|
1732 | mask.attrFile = FILE_DIRECTORY | FILE_ARCHIVED | FILE_HIDDEN |
|
---|
1733 | FILE_SYSTEM | FILE_NORMAL | FILE_READONLY;
|
---|
1734 | size = sizeof(MASK);
|
---|
1735 | if (PrfQueryProfileData(fmprof,
|
---|
1736 | appname, "CollectorFilter", &mask, &size)) {
|
---|
1737 | SetMask(NULL, &mask);
|
---|
1738 | }
|
---|
1739 | if (!mask.attrFile)
|
---|
1740 | mask.attrFile = FILE_DIRECTORY | FILE_ARCHIVED | FILE_HIDDEN |
|
---|
1741 | FILE_SYSTEM | FILE_NORMAL | FILE_READONLY;
|
---|
1742 | strcpy(mask.prompt, GetPString(IDS_DEFCOLFILTERTITLETEXT));
|
---|
1743 | WinSetDlgItemText(hwnd, CFG5_FILTER, mask.szMask);
|
---|
1744 | }
|
---|
1745 | {
|
---|
1746 | DIRCNRDATA dcd;
|
---|
1747 |
|
---|
1748 | memset(&dcd, 0, sizeof(dcd));
|
---|
1749 | LoadDetailsSwitches("Collector", &dcd);
|
---|
1750 | WinCheckButton(hwnd, CFG5_SHOWLNAMES, dcd.detailslongname);
|
---|
1751 | WinCheckButton(hwnd, CFG5_SHOWSUBJECT, dcd.detailssubject);
|
---|
1752 | WinCheckButton(hwnd, CFG5_SHOWEAS, dcd.detailsea);
|
---|
1753 | WinCheckButton(hwnd, CFG5_SHOWSIZE, dcd.detailssize);
|
---|
1754 | WinCheckButton(hwnd, CFG5_SHOWICON, dcd.detailsicon);
|
---|
1755 | WinCheckButton(hwnd, CFG5_SHOWLWDATE, dcd.detailslwdate);
|
---|
1756 | WinCheckButton(hwnd, CFG5_SHOWLWTIME, dcd.detailslwtime);
|
---|
1757 | WinCheckButton(hwnd, CFG5_SHOWLADATE, dcd.detailsladate);
|
---|
1758 | WinCheckButton(hwnd, CFG5_SHOWLATIME, dcd.detailslatime);
|
---|
1759 | WinCheckButton(hwnd, CFG5_SHOWCRDATE, dcd.detailscrdate);
|
---|
1760 | WinCheckButton(hwnd, CFG5_SHOWCRTIME, dcd.detailscrtime);
|
---|
1761 | WinCheckButton(hwnd, CFG5_SHOWATTR, dcd.detailsattr);
|
---|
1762 | }
|
---|
1763 | return 0;
|
---|
1764 |
|
---|
1765 | case UM_SETUP5:
|
---|
1766 | if (WinDlgBox(HWND_DESKTOP, hwndNotebook, PickMaskDlgProc,
|
---|
1767 | FM3ModHandle, MSK_FRAME, MPFROMP(&mask))) {
|
---|
1768 | SetMask(NULL, &mask);
|
---|
1769 | WinSetDlgItemText(hwnd, CFG5_FILTER, mask.szMask);
|
---|
1770 | }
|
---|
1771 | return 0;
|
---|
1772 |
|
---|
1773 | case WM_CONTROL:
|
---|
1774 | switch (SHORT1FROMMP(mp1)) {
|
---|
1775 | case CFG5_FILTER:
|
---|
1776 | switch (SHORT2FROMMP(mp1)) {
|
---|
1777 | case EN_SETFOCUS:
|
---|
1778 | PostMsg(hwnd, UM_FOCUSME, MPVOID, MPVOID);
|
---|
1779 | PostMsg(hwnd, UM_SETUP5, MPVOID, MPVOID);
|
---|
1780 | break;
|
---|
1781 | }
|
---|
1782 | break;
|
---|
1783 | }
|
---|
1784 | return 0;
|
---|
1785 |
|
---|
1786 | case WM_COMMAND:
|
---|
1787 | switch (SHORT1FROMMP(mp1)) {
|
---|
1788 | case IDM_UNDO:
|
---|
1789 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1790 | break;
|
---|
1791 |
|
---|
1792 | case DID_CANCEL:
|
---|
1793 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1794 |
|
---|
1795 | case DID_OK:
|
---|
1796 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
1797 | break;
|
---|
1798 |
|
---|
1799 | case IDM_HELP:
|
---|
1800 | if (hwndHelp)
|
---|
1801 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
1802 | MPFROM2SHORT(HELP_CFG7, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
1803 | break;
|
---|
1804 | }
|
---|
1805 | return 0;
|
---|
1806 |
|
---|
1807 | case WM_CLOSE:
|
---|
1808 | fExternalCollector = WinQueryButtonCheckstate(hwnd,
|
---|
1809 | CFG5_EXTERNALCOLLECTOR);
|
---|
1810 | PrfWriteProfileData(fmprof, FM3Str, "ExternalCollector",
|
---|
1811 | &fExternalCollector, sizeof(BOOL));
|
---|
1812 | {
|
---|
1813 | ULONG flWindowAttr = 0;
|
---|
1814 |
|
---|
1815 | if (WinQueryButtonCheckstate(hwnd, CFG5_ICON))
|
---|
1816 | flWindowAttr |= CV_ICON;
|
---|
1817 | if (WinQueryButtonCheckstate(hwnd, CFG5_NAME))
|
---|
1818 | flWindowAttr |= CV_NAME;
|
---|
1819 | if (WinQueryButtonCheckstate(hwnd, CFG5_TEXT))
|
---|
1820 | flWindowAttr |= CV_TEXT;
|
---|
1821 | if (WinQueryButtonCheckstate(hwnd, CFG5_DETAIL))
|
---|
1822 | flWindowAttr |= CV_DETAIL;
|
---|
1823 | if (WinQueryButtonCheckstate(hwnd, CFG5_MINIICONS))
|
---|
1824 | flWindowAttr |= CV_MINI;
|
---|
1825 | if (WinQueryButtonCheckstate(hwnd, CFG5_SHOWTITLES))
|
---|
1826 | flWindowAttr |= CA_DETAILSVIEWTITLES;
|
---|
1827 | flWindowAttr |= CV_FLOW;
|
---|
1828 | PrfWriteProfileData(fmprof, appname, "CollectorflWindowAttr",
|
---|
1829 | &flWindowAttr, sizeof(ULONG));
|
---|
1830 | }
|
---|
1831 | {
|
---|
1832 | DIRCNRDATA dcd;
|
---|
1833 |
|
---|
1834 | memset(&dcd, 0, sizeof(dcd));
|
---|
1835 | dcd.detailslongname = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLNAMES);
|
---|
1836 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsLongname",
|
---|
1837 | &dcd.detailslongname, sizeof(BOOL));
|
---|
1838 | dcd.detailssubject = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSUBJECT);
|
---|
1839 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsSubject",
|
---|
1840 | &dcd.detailssubject, sizeof(BOOL));
|
---|
1841 | dcd.detailsea = WinQueryButtonCheckstate(hwnd, CFG5_SHOWEAS);
|
---|
1842 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsEA",
|
---|
1843 | &dcd.detailsea, sizeof(BOOL));
|
---|
1844 | dcd.detailssize = WinQueryButtonCheckstate(hwnd, CFG5_SHOWSIZE);
|
---|
1845 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsSize",
|
---|
1846 | &dcd.detailssize, sizeof(BOOL));
|
---|
1847 | dcd.detailsicon = WinQueryButtonCheckstate(hwnd, CFG5_SHOWICON);
|
---|
1848 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsIcon",
|
---|
1849 | &dcd.detailsicon, sizeof(BOOL));
|
---|
1850 | dcd.detailslwdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWDATE);
|
---|
1851 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsLWDate",
|
---|
1852 | &dcd.detailslwdate, sizeof(BOOL));
|
---|
1853 | dcd.detailslwtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLWTIME);
|
---|
1854 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsLWTime",
|
---|
1855 | &dcd.detailslwtime, sizeof(BOOL));
|
---|
1856 | dcd.detailsladate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLADATE);
|
---|
1857 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsLADate",
|
---|
1858 | &dcd.detailsladate, sizeof(BOOL));
|
---|
1859 | dcd.detailslatime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWLATIME);
|
---|
1860 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsLATime",
|
---|
1861 | &dcd.detailslatime, sizeof(BOOL));
|
---|
1862 | dcd.detailscrdate = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRDATE);
|
---|
1863 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsCRDate",
|
---|
1864 | &dcd.detailscrdate, sizeof(BOOL));
|
---|
1865 | dcd.detailscrtime = WinQueryButtonCheckstate(hwnd, CFG5_SHOWCRTIME);
|
---|
1866 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsCRTime",
|
---|
1867 | &dcd.detailscrtime, sizeof(BOOL));
|
---|
1868 | dcd.detailsattr = WinQueryButtonCheckstate(hwnd, CFG5_SHOWATTR);
|
---|
1869 | PrfWriteProfileData(fmprof, appname, "Collector.DetailsAttr",
|
---|
1870 | &dcd.detailsattr, sizeof(BOOL));
|
---|
1871 | *mask.prompt = 0;
|
---|
1872 | PrfWriteProfileData(fmprof,
|
---|
1873 | appname, "CollectorFilter", &mask, sizeof(MASK));
|
---|
1874 | }
|
---|
1875 | break;
|
---|
1876 | }
|
---|
1877 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
1878 | }
|
---|
1879 |
|
---|
1880 | MRESULT EXPENTRY Cfg8DlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
1881 | {
|
---|
1882 | switch (msg) {
|
---|
1883 | case WM_INITDLG:
|
---|
1884 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1885 | break;
|
---|
1886 |
|
---|
1887 | case UM_UNDO:
|
---|
1888 | WinCheckButton(hwnd, CFG6_SORTFIRST, FALSE);
|
---|
1889 | WinCheckButton(hwnd, CFG6_SORTLAST, FALSE);
|
---|
1890 | WinCheckButton(hwnd, CFG6_SORTSIZE, FALSE);
|
---|
1891 | WinCheckButton(hwnd, CFG6_SORTEASIZE, FALSE);
|
---|
1892 | WinCheckButton(hwnd, CFG6_SORTLWDATE, FALSE);
|
---|
1893 | WinCheckButton(hwnd, CFG6_SORTLADATE, FALSE);
|
---|
1894 | WinCheckButton(hwnd, CFG6_SORTCRDATE, FALSE);
|
---|
1895 | WinCheckButton(hwnd, CFG6_SORTNAME, FALSE);
|
---|
1896 | WinCheckButton(hwnd, CFG6_SORTDIRSFIRST, FALSE);
|
---|
1897 | WinCheckButton(hwnd, CFG6_SORTDIRSLAST, FALSE);
|
---|
1898 | WinCheckButton(hwnd, CFG6_SORTREVERSE, FALSE);
|
---|
1899 | if (CollectorsortFlags & SORT_FIRSTEXTENSION)
|
---|
1900 | WinCheckButton(hwnd, CFG6_SORTFIRST, TRUE);
|
---|
1901 | else if (CollectorsortFlags & SORT_LASTEXTENSION)
|
---|
1902 | WinCheckButton(hwnd, CFG6_SORTLAST, TRUE);
|
---|
1903 | else if (CollectorsortFlags & SORT_SIZE)
|
---|
1904 | WinCheckButton(hwnd, CFG6_SORTSIZE, TRUE);
|
---|
1905 | else if (CollectorsortFlags & SORT_EASIZE)
|
---|
1906 | WinCheckButton(hwnd, CFG6_SORTEASIZE, TRUE);
|
---|
1907 | else if (CollectorsortFlags & SORT_LWDATE)
|
---|
1908 | WinCheckButton(hwnd, CFG6_SORTLWDATE, TRUE);
|
---|
1909 | else if (CollectorsortFlags & SORT_LADATE)
|
---|
1910 | WinCheckButton(hwnd, CFG6_SORTLADATE, TRUE);
|
---|
1911 | else if (CollectorsortFlags & SORT_CRDATE)
|
---|
1912 | WinCheckButton(hwnd, CFG6_SORTCRDATE, TRUE);
|
---|
1913 | else if (CollectorsortFlags & SORT_FILENAME)
|
---|
1914 | WinCheckButton(hwnd, CFG6_SORTFILENAME, TRUE);
|
---|
1915 | else
|
---|
1916 | WinCheckButton(hwnd, CFG6_SORTNAME, TRUE);
|
---|
1917 | if (CollectorsortFlags & SORT_DIRSFIRST)
|
---|
1918 | WinCheckButton(hwnd, CFG6_SORTDIRSFIRST, TRUE);
|
---|
1919 | else if (CollectorsortFlags & SORT_DIRSLAST)
|
---|
1920 | WinCheckButton(hwnd, CFG6_SORTDIRSLAST, TRUE);
|
---|
1921 | if (CollectorsortFlags & SORT_REVERSE)
|
---|
1922 | WinCheckButton(hwnd, CFG6_SORTREVERSE, TRUE);
|
---|
1923 | return 0;
|
---|
1924 |
|
---|
1925 | case WM_CONTROL:
|
---|
1926 | switch (SHORT1FROMMP(mp1)) {
|
---|
1927 | case CFG6_SORTDIRSFIRST:
|
---|
1928 | case CFG6_SORTDIRSLAST:
|
---|
1929 | {
|
---|
1930 | BOOL temp;
|
---|
1931 |
|
---|
1932 | temp = WinQueryButtonCheckstate(hwnd, SHORT1FROMMP(mp1));
|
---|
1933 | if (temp) {
|
---|
1934 | switch (SHORT1FROMMP(mp1)) {
|
---|
1935 | case CFG6_SORTDIRSFIRST:
|
---|
1936 | WinCheckButton(hwnd, CFG6_SORTDIRSLAST, FALSE);
|
---|
1937 | break;
|
---|
1938 | case CFG6_SORTDIRSLAST:
|
---|
1939 | WinCheckButton(hwnd, CFG6_SORTDIRSFIRST, FALSE);
|
---|
1940 | break;
|
---|
1941 | }
|
---|
1942 | }
|
---|
1943 | }
|
---|
1944 | break;
|
---|
1945 | }
|
---|
1946 | return 0;
|
---|
1947 |
|
---|
1948 | case WM_COMMAND:
|
---|
1949 | switch (SHORT1FROMMP(mp1)) {
|
---|
1950 | case IDM_UNDO:
|
---|
1951 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1952 | break;
|
---|
1953 |
|
---|
1954 | case DID_CANCEL:
|
---|
1955 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
1956 |
|
---|
1957 | case DID_OK:
|
---|
1958 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
1959 | break;
|
---|
1960 |
|
---|
1961 | case IDM_HELP:
|
---|
1962 | if (hwndHelp)
|
---|
1963 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
1964 | MPFROM2SHORT(HELP_CFG8, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
1965 | break;
|
---|
1966 | }
|
---|
1967 | return 0;
|
---|
1968 |
|
---|
1969 | case WM_CLOSE:
|
---|
1970 | CollectorsortFlags = 0;
|
---|
1971 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTFILENAME))
|
---|
1972 | CollectorsortFlags |= SORT_FILENAME;
|
---|
1973 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTSIZE))
|
---|
1974 | CollectorsortFlags |= SORT_SIZE;
|
---|
1975 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTEASIZE))
|
---|
1976 | CollectorsortFlags |= SORT_EASIZE;
|
---|
1977 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTFIRST))
|
---|
1978 | CollectorsortFlags |= SORT_FIRSTEXTENSION;
|
---|
1979 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLAST))
|
---|
1980 | CollectorsortFlags |= SORT_LASTEXTENSION;
|
---|
1981 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLWDATE))
|
---|
1982 | CollectorsortFlags |= SORT_LWDATE;
|
---|
1983 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTLADATE))
|
---|
1984 | CollectorsortFlags |= SORT_LADATE;
|
---|
1985 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTCRDATE))
|
---|
1986 | CollectorsortFlags |= SORT_CRDATE;
|
---|
1987 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTDIRSFIRST))
|
---|
1988 | CollectorsortFlags |= SORT_DIRSFIRST;
|
---|
1989 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTDIRSLAST))
|
---|
1990 | CollectorsortFlags |= SORT_DIRSLAST;
|
---|
1991 | if (WinQueryButtonCheckstate(hwnd, CFG6_SORTREVERSE))
|
---|
1992 | CollectorsortFlags |= SORT_REVERSE;
|
---|
1993 | PrfWriteProfileData(fmprof,
|
---|
1994 | appname,
|
---|
1995 | "CollectorSort", &CollectorsortFlags, sizeof(INT));
|
---|
1996 | break;
|
---|
1997 | }
|
---|
1998 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
1999 | }
|
---|
2000 |
|
---|
2001 | MRESULT EXPENTRY Cfg9DlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
2002 | {
|
---|
2003 | switch (msg) {
|
---|
2004 | case WM_INITDLG:
|
---|
2005 | break;
|
---|
2006 |
|
---|
2007 | case WM_COMMAND:
|
---|
2008 | switch (SHORT1FROMMP(mp1)) {
|
---|
2009 | case IDM_HELP:
|
---|
2010 | if (hwndHelp)
|
---|
2011 | WinSendMsg(hwndHelp, HM_DISPLAY_HELP,
|
---|
2012 | MPFROM2SHORT(HELP_CFG9, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
2013 | return 0;
|
---|
2014 | case CFG9_MAXIMUMUI:
|
---|
2015 | if (hwndMain) {
|
---|
2016 | if (MenuInvisible)
|
---|
2017 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2018 | MPFROM2SHORT(IDM_HIDEMENU, 0), MPVOID);
|
---|
2019 | if (!fAutoView)
|
---|
2020 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2021 | MPFROM2SHORT(IDM_AUTOVIEW, 0), MPVOID);
|
---|
2022 | if (!fDrivebar)
|
---|
2023 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2024 | MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID);
|
---|
2025 | if (!fToolbar)
|
---|
2026 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2027 | MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);
|
---|
2028 | if (!fMoreButtons)
|
---|
2029 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2030 | MPFROM2SHORT(IDM_MOREBUTTONS, 0), MPVOID);
|
---|
2031 | if (!fUserComboBox)
|
---|
2032 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2033 | MPFROM2SHORT(IDM_USERLIST, 0), MPVOID);
|
---|
2034 | }
|
---|
2035 | return 0;
|
---|
2036 | case CFG9_MINIMUMUI:
|
---|
2037 | if (hwndMain) {
|
---|
2038 | if (!MenuInvisible)
|
---|
2039 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2040 | MPFROM2SHORT(IDM_HIDEMENU, 0), MPVOID);
|
---|
2041 | if (fAutoView)
|
---|
2042 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2043 | MPFROM2SHORT(IDM_AUTOVIEW, 0), MPVOID);
|
---|
2044 | if (fToolbar)
|
---|
2045 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2046 | MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);
|
---|
2047 | if (fMoreButtons)
|
---|
2048 | WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_MOREBUTTONS, 0),
|
---|
2049 | MPVOID);
|
---|
2050 | if (fUserComboBox)
|
---|
2051 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2052 | MPFROM2SHORT(IDM_USERLIST, 0), MPVOID);
|
---|
2053 | saymsg(MB_ENTER | MB_ICONASTERISK,
|
---|
2054 | hwnd,
|
---|
2055 | GetPString(IDS_DONTFORGETTEXT),
|
---|
2056 | GetPString(IDS_UNHIDEMENUWARNTEXT));
|
---|
2057 | }
|
---|
2058 | return 0;
|
---|
2059 | case CFG9_MAXINFOPRETTY:
|
---|
2060 | fLoadSubject = TRUE;
|
---|
2061 | fLoadLongnames = TRUE;
|
---|
2062 | fNoIconsFiles = FALSE;
|
---|
2063 | fNoIconsDirs = FALSE;
|
---|
2064 | fForceUpper = FALSE;
|
---|
2065 | fForceLower = FALSE;
|
---|
2066 | fArcStuffVisible = TRUE;
|
---|
2067 | fSplitStatus = TRUE;
|
---|
2068 | fDragndropDlg = TRUE;
|
---|
2069 | {
|
---|
2070 | ULONG flWindowAttr;
|
---|
2071 |
|
---|
2072 | flWindowAttr = CV_DETAIL | CV_FLOW | CA_DETAILSVIEWTITLES;
|
---|
2073 | PrfWriteProfileData(fmprof,
|
---|
2074 | appname,
|
---|
2075 | "DirflWindowAttr", &flWindowAttr, sizeof(ULONG));
|
---|
2076 | PrfWriteProfileData(fmprof,
|
---|
2077 | appname,
|
---|
2078 | "CollectorflWindowAttr",
|
---|
2079 | &flWindowAttr, sizeof(ULONG));
|
---|
2080 | PrfWriteProfileData(fmprof, appname, "DirCnr.Fontnamesize", NULL, 0);
|
---|
2081 | PrfWriteProfileData(fmprof,
|
---|
2082 | appname, "Collector.Fontnamesize", NULL, 0);
|
---|
2083 | }
|
---|
2084 | detailslongname = TRUE;
|
---|
2085 | detailssubject = TRUE;
|
---|
2086 | detailsea = TRUE;
|
---|
2087 | detailssize = TRUE;
|
---|
2088 | detailsicon = TRUE;
|
---|
2089 | detailslwdate = TRUE;
|
---|
2090 | detailslwtime = TRUE;
|
---|
2091 | detailsladate = TRUE;
|
---|
2092 | detailslatime = TRUE;
|
---|
2093 | detailscrdate = TRUE;
|
---|
2094 | detailscrtime = TRUE;
|
---|
2095 | detailsattr = TRUE;
|
---|
2096 | if (hwndTree) {
|
---|
2097 |
|
---|
2098 | CNRINFO cnri;
|
---|
2099 | ULONG flWindowAttr = CV_TREE | CV_ICON | CV_FLOW | CA_TREELINE;
|
---|
2100 |
|
---|
2101 | memset(&cnri, 0, sizeof(cnri));
|
---|
2102 | cnri.cb = sizeof(cnri);
|
---|
2103 | WinSendMsg(WinWindowFromID
|
---|
2104 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2105 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
2106 | cnri.flWindowAttr = flWindowAttr;
|
---|
2107 | WinSendMsg(WinWindowFromID
|
---|
2108 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2109 | CM_SETCNRINFO, MPFROMP(&cnri),
|
---|
2110 | MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
2111 | }
|
---|
2112 | break;
|
---|
2113 |
|
---|
2114 | case CFG9_MAXINFOPLAIN:
|
---|
2115 | fLoadSubject = TRUE;
|
---|
2116 | fLoadLongnames = TRUE;
|
---|
2117 | fNoIconsFiles = TRUE;
|
---|
2118 | fNoIconsDirs = TRUE;
|
---|
2119 | fForceUpper = FALSE;
|
---|
2120 | fForceLower = FALSE;
|
---|
2121 | fArcStuffVisible = TRUE;
|
---|
2122 | fSplitStatus = TRUE;
|
---|
2123 | fDragndropDlg = TRUE;
|
---|
2124 | {
|
---|
2125 | ULONG flWindowAttr;
|
---|
2126 |
|
---|
2127 | flWindowAttr = CV_DETAIL | CV_FLOW | CV_MINI;
|
---|
2128 | PrfWriteProfileData(fmprof,
|
---|
2129 | appname,
|
---|
2130 | "DirflWindowAttr", &flWindowAttr, sizeof(ULONG));
|
---|
2131 | PrfWriteProfileData(fmprof,
|
---|
2132 | appname,
|
---|
2133 | "CollectorflWindowAttr",
|
---|
2134 | &flWindowAttr, sizeof(ULONG));
|
---|
2135 | PrfWriteProfileData(fmprof,
|
---|
2136 | appname,
|
---|
2137 | "DirCnr.Fontnamesize",
|
---|
2138 | GetPString(IDS_8HELVTEXT),
|
---|
2139 | strlen(GetPString(IDS_8HELVTEXT)) + 1);
|
---|
2140 | PrfWriteProfileData(fmprof,
|
---|
2141 | appname,
|
---|
2142 | "Collector.Fontnamesize",
|
---|
2143 | GetPString(IDS_8HELVTEXT),
|
---|
2144 | strlen(GetPString(IDS_8HELVTEXT)) + 1);
|
---|
2145 | }
|
---|
2146 | detailslongname = TRUE;
|
---|
2147 | detailssubject = TRUE;
|
---|
2148 | detailsea = TRUE;
|
---|
2149 | detailssize = TRUE;
|
---|
2150 | detailsicon = TRUE;
|
---|
2151 | detailslwdate = TRUE;
|
---|
2152 | detailslwtime = TRUE;
|
---|
2153 | detailsladate = TRUE;
|
---|
2154 | detailslatime = TRUE;
|
---|
2155 | detailscrdate = TRUE;
|
---|
2156 | detailscrtime = TRUE;
|
---|
2157 | detailsattr = TRUE;
|
---|
2158 | if (hwndTree) {
|
---|
2159 |
|
---|
2160 | CNRINFO cnri;
|
---|
2161 | ULONG flWindowAttr = CV_TREE | CV_MINI | CV_TEXT |
|
---|
2162 | CV_FLOW | CA_TREELINE;
|
---|
2163 |
|
---|
2164 | memset(&cnri, 0, sizeof(cnri));
|
---|
2165 | cnri.cb = sizeof(cnri);
|
---|
2166 | WinSendMsg(WinWindowFromID
|
---|
2167 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2168 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
2169 | cnri.flWindowAttr = flWindowAttr;
|
---|
2170 | WinSendMsg(WinWindowFromID
|
---|
2171 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2172 | CM_SETCNRINFO, MPFROMP(&cnri),
|
---|
2173 | MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
2174 | }
|
---|
2175 | break;
|
---|
2176 | case CFG9_MAXFILENAMES:
|
---|
2177 | if (hwndMain && fAutoView)
|
---|
2178 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2179 | MPFROM2SHORT(IDM_AUTOVIEW, 0), MPVOID);
|
---|
2180 | fForceUpper = FALSE;
|
---|
2181 | fForceLower = TRUE;
|
---|
2182 | fExternalViewer = TRUE;
|
---|
2183 | fExternalArcboxes = TRUE;
|
---|
2184 | fExternalCollector = TRUE;
|
---|
2185 | fExternalINIs = TRUE;
|
---|
2186 | fLoadSubject = FALSE;
|
---|
2187 | fLoadLongnames = FALSE;
|
---|
2188 | fNoIconsFiles = TRUE;
|
---|
2189 | fNoIconsDirs = TRUE;
|
---|
2190 | {
|
---|
2191 | ULONG flWindowAttr;
|
---|
2192 |
|
---|
2193 | flWindowAttr = CV_TEXT | CV_FLOW;
|
---|
2194 | PrfWriteProfileData(fmprof, appname, "DirflWindowAttr",
|
---|
2195 | &flWindowAttr, sizeof(ULONG));
|
---|
2196 | PrfWriteProfileData(fmprof, appname, "CollectorflWindowAttr",
|
---|
2197 | &flWindowAttr, sizeof(ULONG));
|
---|
2198 | PrfWriteProfileData(fmprof, appname, "DirCnr.Fontnamesize",
|
---|
2199 | GetPString(IDS_8HELVTEXT),
|
---|
2200 | strlen(GetPString(IDS_8HELVTEXT)) + 1);
|
---|
2201 | PrfWriteProfileData(fmprof, appname, "Collector.Fontnamesize",
|
---|
2202 | GetPString(IDS_8HELVTEXT),
|
---|
2203 | strlen(GetPString(IDS_8HELVTEXT)) + 1);
|
---|
2204 | }
|
---|
2205 | if (hwndTree) {
|
---|
2206 |
|
---|
2207 | CNRINFO cnri;
|
---|
2208 | ULONG flWindowAttr = CV_TREE | CV_TEXT | CV_FLOW | CA_TREELINE;
|
---|
2209 |
|
---|
2210 | memset(&cnri, 0, sizeof(cnri));
|
---|
2211 | cnri.cb = sizeof(cnri);
|
---|
2212 | WinSendMsg(WinWindowFromID
|
---|
2213 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2214 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
2215 | cnri.flWindowAttr = flWindowAttr;
|
---|
2216 | WinSendMsg(WinWindowFromID
|
---|
2217 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2218 | CM_SETCNRINFO, MPFROMP(&cnri),
|
---|
2219 | MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
2220 | }
|
---|
2221 | break;
|
---|
2222 | case CFG9_MAXSPEED:
|
---|
2223 | fLoadSubject = FALSE;
|
---|
2224 | fLoadLongnames = FALSE;
|
---|
2225 | fVerify = FALSE;
|
---|
2226 | DosSetVerify(FALSE);
|
---|
2227 | FilesToGet = FILESTOGET_MAX;
|
---|
2228 | fQuickArcFind = TRUE;
|
---|
2229 | fMinOnOpen = TRUE;
|
---|
2230 | fRealIdle = FALSE;
|
---|
2231 | fNoIconsFiles = TRUE;
|
---|
2232 | fNoIconsDirs = TRUE;
|
---|
2233 | fSyncUpdates = FALSE;
|
---|
2234 | fArcStuffVisible = FALSE;
|
---|
2235 | fForceUpper = FALSE;
|
---|
2236 | fForceLower = FALSE;
|
---|
2237 | detailslongname = FALSE;
|
---|
2238 | detailssubject = FALSE;
|
---|
2239 | break;
|
---|
2240 |
|
---|
2241 | case CFG9_HECTOR:
|
---|
2242 | fSwitchTree = TRUE;
|
---|
2243 | fSwitchTreeOnFocus = FALSE;
|
---|
2244 | fSwitchTreeExpand = TRUE;
|
---|
2245 | fCollapseFirst = TRUE;
|
---|
2246 | fSelectedAlways = FALSE;
|
---|
2247 | fTileBackwards = FALSE;
|
---|
2248 | fExternalViewer = FALSE;
|
---|
2249 | fExternalArcboxes = TRUE;
|
---|
2250 | fExternalCollector = FALSE;
|
---|
2251 | fExternalINIs = TRUE;
|
---|
2252 | fCopyDefault = FALSE;
|
---|
2253 | fFollowTree = FALSE;
|
---|
2254 | fLoadSubject = FALSE;
|
---|
2255 | fLoadLongnames = FALSE;
|
---|
2256 | fDontMoveMouse = FALSE;
|
---|
2257 | fUnHilite = TRUE;
|
---|
2258 | fUserListSwitches = TRUE;
|
---|
2259 | fDCOpens = FALSE;
|
---|
2260 | fLinkSetsIcon = FALSE;
|
---|
2261 | fConfirmDelete = TRUE;
|
---|
2262 | fSyncUpdates = FALSE;
|
---|
2263 | fRealIdle = FALSE;
|
---|
2264 | fNoIconsFiles = FALSE;
|
---|
2265 | fNoIconsDirs = TRUE;
|
---|
2266 | fFolderAfterExtract = FALSE;
|
---|
2267 | fVerify = TRUE;
|
---|
2268 | DosSetVerify(TRUE);
|
---|
2269 | fForceUpper = FALSE;
|
---|
2270 | fForceLower = TRUE;
|
---|
2271 | fArcStuffVisible = FALSE;
|
---|
2272 | fVTreeOpensWPS = FALSE;
|
---|
2273 | fRemoteBug = FALSE;
|
---|
2274 | fDragndropDlg = TRUE;
|
---|
2275 | fMinOnOpen = FALSE;
|
---|
2276 | fQuickArcFind = TRUE;
|
---|
2277 | fNoRemovableScan = TRUE;
|
---|
2278 | FilesToGet = FILESTOGET_MIN;
|
---|
2279 | fFreeTree = FALSE;
|
---|
2280 | fSplitStatus = TRUE;
|
---|
2281 | fAutoTile = TRUE;
|
---|
2282 | fSaveState = TRUE;
|
---|
2283 | fStartMinimized = FALSE;
|
---|
2284 | fStartMaximized = FALSE;
|
---|
2285 | fDataMin = FALSE;
|
---|
2286 | ulCnrType = CCS_EXTENDSEL | CCS_MULTIPLESEL;
|
---|
2287 | fNoTreeGap = TRUE;
|
---|
2288 | {
|
---|
2289 | ULONG flWindowAttr;
|
---|
2290 |
|
---|
2291 | flWindowAttr = (CV_NAME | CV_MINI | CV_FLOW | CA_DETAILSVIEWTITLES);
|
---|
2292 | PrfWriteProfileData(fmprof, appname, "DirflWindowAttr",
|
---|
2293 | &flWindowAttr, sizeof(ULONG));
|
---|
2294 | PrfWriteProfileData(fmprof, appname, "CollectorflWindowAttr",
|
---|
2295 | &flWindowAttr, sizeof(ULONG));
|
---|
2296 | }
|
---|
2297 | detailslongname = FALSE;
|
---|
2298 | detailssubject = FALSE;
|
---|
2299 | detailsea = TRUE;
|
---|
2300 | detailssize = TRUE;
|
---|
2301 | detailsicon = TRUE;
|
---|
2302 | detailslwdate = TRUE;
|
---|
2303 | detailslwtime = TRUE;
|
---|
2304 | detailsladate = FALSE;
|
---|
2305 | detailslatime = FALSE;
|
---|
2306 | detailscrdate = FALSE;
|
---|
2307 | detailscrtime = FALSE;
|
---|
2308 | detailsattr = TRUE;
|
---|
2309 | sortFlags = SORT_FILENAME | SORT_DIRSFIRST;
|
---|
2310 | CollectorsortFlags = SORT_FILENAME | SORT_DIRSFIRST;
|
---|
2311 | if (hwndMain) {
|
---|
2312 |
|
---|
2313 | SWP swp;
|
---|
2314 |
|
---|
2315 | if (WinQueryWindowPos(hwndMain, &swp)) {
|
---|
2316 | WinSetWindowPos(hwndTree, HWND_TOP, 0, 0,
|
---|
2317 | swp.cx / 5, swp.cy, SWP_MOVE | SWP_SIZE);
|
---|
2318 | }
|
---|
2319 | }
|
---|
2320 | if (hwndMain) {
|
---|
2321 | if (MenuInvisible)
|
---|
2322 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2323 | MPFROM2SHORT(IDM_HIDEMENU, 0), MPVOID);
|
---|
2324 | if (fAutoView)
|
---|
2325 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2326 | MPFROM2SHORT(IDM_AUTOVIEW, 0), MPVOID);
|
---|
2327 | if (fToolbar)
|
---|
2328 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2329 | MPFROM2SHORT(IDM_TOOLBAR, 0), MPVOID);
|
---|
2330 | if (!fDrivebar)
|
---|
2331 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2332 | MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID);
|
---|
2333 | if (!fMoreButtons)
|
---|
2334 | WinSendMsg(hwndMain, WM_COMMAND, MPFROM2SHORT(IDM_MOREBUTTONS, 0),
|
---|
2335 | MPVOID);
|
---|
2336 | if (!fUserComboBox)
|
---|
2337 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2338 | MPFROM2SHORT(IDM_USERLIST, 0), MPVOID);
|
---|
2339 | }
|
---|
2340 | if (hwndTree) {
|
---|
2341 |
|
---|
2342 | CNRINFO cnri;
|
---|
2343 | ULONG flWindowAttr = (CV_TREE | CV_TEXT | CV_MINI |
|
---|
2344 | CV_FLOW | CA_TREELINE);
|
---|
2345 |
|
---|
2346 | memset(&cnri, 0, sizeof(cnri));
|
---|
2347 | cnri.cb = sizeof(cnri);
|
---|
2348 | WinSendMsg(WinWindowFromID
|
---|
2349 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2350 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
2351 | cnri.flWindowAttr = flWindowAttr;
|
---|
2352 | WinSendMsg(WinWindowFromID
|
---|
2353 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2354 | CM_SETCNRINFO, MPFROMP(&cnri),
|
---|
2355 | MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
2356 | }
|
---|
2357 | break;
|
---|
2358 |
|
---|
2359 | case CFG9_DEFAULT:
|
---|
2360 | fSwitchTree = FALSE;
|
---|
2361 | fSwitchTreeOnFocus = FALSE;
|
---|
2362 | fSwitchTreeExpand = FALSE;
|
---|
2363 | fCollapseFirst = FALSE;
|
---|
2364 | fSelectedAlways = FALSE;
|
---|
2365 | fTileBackwards = FALSE;
|
---|
2366 | fExternalViewer = FALSE;
|
---|
2367 | fExternalArcboxes = FALSE;
|
---|
2368 | fExternalCollector = FALSE;
|
---|
2369 | fExternalINIs = FALSE;
|
---|
2370 | fCopyDefault = FALSE;
|
---|
2371 | fFollowTree = FALSE;
|
---|
2372 | fLoadSubject = TRUE;
|
---|
2373 | fLoadLongnames = TRUE;
|
---|
2374 | fDontMoveMouse = FALSE;
|
---|
2375 | fUnHilite = TRUE;
|
---|
2376 | fUserListSwitches = FALSE;
|
---|
2377 | fDCOpens = FALSE;
|
---|
2378 | fLinkSetsIcon = FALSE;
|
---|
2379 | fConfirmDelete = TRUE;
|
---|
2380 | fSyncUpdates = FALSE;
|
---|
2381 | fRealIdle = FALSE;
|
---|
2382 | fNoIconsFiles = FALSE;
|
---|
2383 | fNoIconsDirs = FALSE;
|
---|
2384 | fFolderAfterExtract = FALSE;
|
---|
2385 | fVerify = TRUE;
|
---|
2386 | fNoSearch = TRUE;
|
---|
2387 | DosSetVerify(TRUE);
|
---|
2388 | fForceUpper = FALSE;
|
---|
2389 | fForceLower = TRUE;
|
---|
2390 | fArcStuffVisible = TRUE;
|
---|
2391 | fVTreeOpensWPS = FALSE;
|
---|
2392 | fRemoteBug = TRUE;
|
---|
2393 | fDragndropDlg = TRUE;
|
---|
2394 | fMinOnOpen = FALSE;
|
---|
2395 | fQuickArcFind = TRUE;
|
---|
2396 | fNoRemovableScan = FALSE;
|
---|
2397 | FilesToGet = FILESTOGET_MAX;
|
---|
2398 | fFreeTree = FALSE;
|
---|
2399 | fSplitStatus = TRUE;
|
---|
2400 | fAutoTile = TRUE;
|
---|
2401 | fSaveState = TRUE;
|
---|
2402 | fStartMinimized = FALSE;
|
---|
2403 | fStartMaximized = FALSE;
|
---|
2404 | fDataMin = TRUE;
|
---|
2405 | ulCnrType = CCS_EXTENDSEL;
|
---|
2406 | fNoTreeGap = FALSE;
|
---|
2407 | {
|
---|
2408 | ULONG flWindowAttr;
|
---|
2409 |
|
---|
2410 | flWindowAttr = (CV_NAME | CV_MINI | CV_FLOW | CA_DETAILSVIEWTITLES);
|
---|
2411 | PrfWriteProfileData(fmprof, appname, "DirflWindowAttr",
|
---|
2412 | &flWindowAttr, sizeof(ULONG));
|
---|
2413 | PrfWriteProfileData(fmprof, appname, "CollectorflWindowAttr",
|
---|
2414 | &flWindowAttr, sizeof(ULONG));
|
---|
2415 | }
|
---|
2416 | detailslongname = FALSE;
|
---|
2417 | detailssubject = FALSE;
|
---|
2418 | detailsea = TRUE;
|
---|
2419 | detailssize = TRUE;
|
---|
2420 | detailsicon = TRUE;
|
---|
2421 | detailslwdate = TRUE;
|
---|
2422 | detailslwtime = TRUE;
|
---|
2423 | detailsladate = FALSE;
|
---|
2424 | detailslatime = FALSE;
|
---|
2425 | detailscrdate = FALSE;
|
---|
2426 | detailscrtime = FALSE;
|
---|
2427 | detailsattr = TRUE;
|
---|
2428 | sortFlags = SORT_FILENAME | SORT_DIRSFIRST;
|
---|
2429 | CollectorsortFlags = SORT_FILENAME | SORT_DIRSFIRST;
|
---|
2430 | if (hwndMain) {
|
---|
2431 |
|
---|
2432 | SWP swp;
|
---|
2433 |
|
---|
2434 | if (WinQueryWindowPos(hwndMain, &swp)) {
|
---|
2435 | WinSetWindowPos(hwndTree, HWND_TOP, 0, 0,
|
---|
2436 | swp.cx / 5,
|
---|
2437 | swp.cy -
|
---|
2438 | (WinQuerySysValue(HWND_DESKTOP, SV_CYICON) * 2),
|
---|
2439 | SWP_MOVE | SWP_SIZE);
|
---|
2440 | }
|
---|
2441 | }
|
---|
2442 | if (hwndTree) {
|
---|
2443 |
|
---|
2444 | CNRINFO cnri;
|
---|
2445 | ULONG flWindowAttr = (CV_TREE | CV_TEXT |
|
---|
2446 | CV_FLOW | CA_TREELINE | CV_MINI);
|
---|
2447 |
|
---|
2448 | memset(&cnri, 0, sizeof(cnri));
|
---|
2449 | cnri.cb = sizeof(cnri);
|
---|
2450 | WinSendMsg(WinWindowFromID
|
---|
2451 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2452 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
2453 | cnri.flWindowAttr = flWindowAttr;
|
---|
2454 | WinSendMsg(WinWindowFromID
|
---|
2455 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2456 | CM_SETCNRINFO, MPFROMP(&cnri),
|
---|
2457 | MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
2458 | }
|
---|
2459 | break;
|
---|
2460 |
|
---|
2461 | case CFG9_WINDOZETHINK:
|
---|
2462 | fTileBackwards = FALSE;
|
---|
2463 | ulCnrType = CCS_MULTIPLESEL;
|
---|
2464 | fFollowTree = TRUE;
|
---|
2465 | fTopDir = FALSE;
|
---|
2466 | fSwitchTree = TRUE;
|
---|
2467 | fSwitchTreeOnFocus = FALSE;
|
---|
2468 | fSwitchTreeExpand = TRUE;
|
---|
2469 | fCollapseFirst = TRUE;
|
---|
2470 | fDCOpens = FALSE;
|
---|
2471 | {
|
---|
2472 | ULONG flWindowAttr;
|
---|
2473 |
|
---|
2474 | flWindowAttr = CV_NAME | CV_FLOW | CA_DETAILSVIEWTITLES;
|
---|
2475 | PrfWriteProfileData(fmprof, appname, "DirflWindowAttr",
|
---|
2476 | &flWindowAttr, sizeof(ULONG));
|
---|
2477 | PrfWriteProfileData(fmprof, appname, "CollectorflWindowAttr",
|
---|
2478 | &flWindowAttr, sizeof(ULONG));
|
---|
2479 | }
|
---|
2480 | fLinkSetsIcon = FALSE;
|
---|
2481 | fFreeTree = FALSE;
|
---|
2482 | fNoTreeGap = TRUE;
|
---|
2483 | fExternalArcboxes = TRUE;
|
---|
2484 | fExternalViewer = TRUE;
|
---|
2485 | fExternalCollector = TRUE;
|
---|
2486 | fExternalINIs = TRUE;
|
---|
2487 | fUserListSwitches = TRUE;
|
---|
2488 | WinSendMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), UM_UNDO, MPVOID,
|
---|
2489 | MPVOID);
|
---|
2490 | if (hwndTree) {
|
---|
2491 |
|
---|
2492 | CNRINFO cnri;
|
---|
2493 | ULONG flWindowAttr = CV_TREE | CV_MINI | CV_ICON |
|
---|
2494 | CV_FLOW | CA_TREELINE;
|
---|
2495 |
|
---|
2496 | memset(&cnri, 0, sizeof(cnri));
|
---|
2497 | cnri.cb = sizeof(cnri);
|
---|
2498 | WinSendMsg(WinWindowFromID
|
---|
2499 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2500 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
2501 | cnri.flWindowAttr = flWindowAttr;
|
---|
2502 | WinSendMsg(WinWindowFromID
|
---|
2503 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2504 | CM_SETCNRINFO, MPFROMP(&cnri),
|
---|
2505 | MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
2506 | }
|
---|
2507 | if (hwndMain) {
|
---|
2508 | if (fAutoView)
|
---|
2509 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2510 | MPFROM2SHORT(IDM_AUTOVIEW, 0), MPVOID);
|
---|
2511 | if (!fDrivebar)
|
---|
2512 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2513 | MPFROM2SHORT(IDM_DRIVEBAR, 0), MPVOID);
|
---|
2514 | {
|
---|
2515 | SWP swp;
|
---|
2516 |
|
---|
2517 | if (WinQueryWindowPos(hwndMain, &swp)) {
|
---|
2518 | WinSetWindowPos(hwndTree, HWND_TOP, 0, 0,
|
---|
2519 | swp.cx / 5, swp.cy, SWP_MOVE | SWP_SIZE);
|
---|
2520 | }
|
---|
2521 | }
|
---|
2522 | PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(2L));
|
---|
2523 | PostMsg(MainObjectHwnd, UM_SETDIR, MPFROMLONG(1L), MPVOID);
|
---|
2524 | }
|
---|
2525 | return 0;
|
---|
2526 |
|
---|
2527 | case CFG9_DOSTHINK:
|
---|
2528 | fTileBackwards = TRUE;
|
---|
2529 | ulCnrType = CCS_MULTIPLESEL;
|
---|
2530 | fSwitchTree = TRUE;
|
---|
2531 | fSwitchTreeOnFocus = FALSE;
|
---|
2532 | fSwitchTreeExpand = TRUE;
|
---|
2533 | fCollapseFirst = TRUE;
|
---|
2534 | fFollowTree = TRUE;
|
---|
2535 | fTopDir = FALSE;
|
---|
2536 | if (hwndMain) {
|
---|
2537 | if (!fTextTools)
|
---|
2538 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2539 | MPFROM2SHORT(IDM_TEXTTOOLS, 0), MPVOID);
|
---|
2540 | }
|
---|
2541 | {
|
---|
2542 | ULONG flWindowAttr;
|
---|
2543 |
|
---|
2544 | flWindowAttr = CV_TEXT | CV_FLOW | CA_DETAILSVIEWTITLES;
|
---|
2545 | PrfWriteProfileData(fmprof, appname, "DirflWindowAttr",
|
---|
2546 | &flWindowAttr, sizeof(ULONG));
|
---|
2547 | PrfWriteProfileData(fmprof, appname, "CollectorflWindowAttr",
|
---|
2548 | &flWindowAttr, sizeof(ULONG));
|
---|
2549 | }
|
---|
2550 | if (hwndTree) {
|
---|
2551 |
|
---|
2552 | CNRINFO cnri;
|
---|
2553 | ULONG flWindowAttr = CV_TREE | CV_TEXT | CV_FLOW | CA_TREELINE;
|
---|
2554 |
|
---|
2555 | memset(&cnri, 0, sizeof(cnri));
|
---|
2556 | cnri.cb = sizeof(cnri);
|
---|
2557 | WinSendMsg(WinWindowFromID
|
---|
2558 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2559 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
2560 | cnri.flWindowAttr = flWindowAttr;
|
---|
2561 | WinSendMsg(WinWindowFromID
|
---|
2562 | (WinWindowFromID(hwndTree, FID_CLIENT), TREE_CNR),
|
---|
2563 | CM_SETCNRINFO, MPFROMP(&cnri),
|
---|
2564 | MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
2565 | }
|
---|
2566 | /* intentional fallthru */
|
---|
2567 | case CFG9_1X:
|
---|
2568 | if (SHORT1FROMMP(mp1) == CFG9_1X) {
|
---|
2569 | fTileBackwards = FALSE;
|
---|
2570 | ulCnrType = CCS_MULTIPLESEL | CCS_EXTENDSEL;
|
---|
2571 | fSwitchTree = FALSE;
|
---|
2572 | fSwitchTreeOnFocus = FALSE;
|
---|
2573 | fSwitchTreeExpand = FALSE;
|
---|
2574 | fCollapseFirst = FALSE;
|
---|
2575 | fFollowTree = FALSE;
|
---|
2576 | fNoSearch = TRUE;
|
---|
2577 | }
|
---|
2578 | fAutoTile = TRUE;
|
---|
2579 | fSaveState = TRUE;
|
---|
2580 | fDCOpens = FALSE;
|
---|
2581 | fLinkSetsIcon = FALSE;
|
---|
2582 | fFreeTree = FALSE;
|
---|
2583 | fNoTreeGap = TRUE;
|
---|
2584 | fExternalArcboxes = TRUE;
|
---|
2585 | fExternalViewer = TRUE;
|
---|
2586 | fExternalCollector = TRUE;
|
---|
2587 | fExternalINIs = TRUE;
|
---|
2588 | fUserListSwitches = TRUE;
|
---|
2589 | WinSendMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), UM_UNDO, MPVOID,
|
---|
2590 | MPVOID);
|
---|
2591 | if (hwndTree) {
|
---|
2592 |
|
---|
2593 | CNRINFO cnri;
|
---|
2594 | ULONG flWindowAttr = CV_TREE | CV_ICON | CV_FLOW | CA_TREELINE;
|
---|
2595 |
|
---|
2596 | memset(&cnri, 0, sizeof(cnri));
|
---|
2597 | cnri.cb = sizeof(cnri);
|
---|
2598 | WinSendMsg(WinWindowFromID(WinWindowFromID(hwndTree, FID_CLIENT),
|
---|
2599 | TREE_CNR),
|
---|
2600 | CM_QUERYCNRINFO, MPFROMP(&cnri), MPFROMLONG(sizeof(cnri)));
|
---|
2601 | cnri.flWindowAttr = flWindowAttr;
|
---|
2602 | WinSendMsg(WinWindowFromID(WinWindowFromID(hwndTree, FID_CLIENT),
|
---|
2603 | TREE_CNR),
|
---|
2604 | CM_SETCNRINFO,
|
---|
2605 | MPFROMP(&cnri), MPFROMLONG(CMA_FLWINDOWATTR));
|
---|
2606 | }
|
---|
2607 | if (hwndMain) {
|
---|
2608 | if (fAutoView)
|
---|
2609 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2610 | MPFROM2SHORT(IDM_AUTOVIEW, 0), MPVOID);
|
---|
2611 | if (fUserComboBox)
|
---|
2612 | WinSendMsg(hwndMain, WM_COMMAND,
|
---|
2613 | MPFROM2SHORT(IDM_USERLIST, 0), MPVOID);
|
---|
2614 | {
|
---|
2615 | SWP swp;
|
---|
2616 |
|
---|
2617 | if (WinQueryWindowPos(hwndMain, &swp)) {
|
---|
2618 | WinSetWindowPos(hwndTree, HWND_TOP, 0, 0,
|
---|
2619 | swp.cx / 5, swp.cy, SWP_MOVE | SWP_SIZE);
|
---|
2620 | }
|
---|
2621 | }
|
---|
2622 | PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(2L));
|
---|
2623 | PostMsg(MainObjectHwnd, UM_SETDIR, MPVOID, MPVOID);
|
---|
2624 | }
|
---|
2625 | return 0;
|
---|
2626 |
|
---|
2627 | case DID_CANCEL:
|
---|
2628 | WinSendMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
2629 |
|
---|
2630 | case DID_OK:
|
---|
2631 | PostMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER), msg, mp1, mp2);
|
---|
2632 | return 0;
|
---|
2633 |
|
---|
2634 | default:
|
---|
2635 | return 0;
|
---|
2636 | }
|
---|
2637 | PrfWriteProfileData(fmprof, appname, "DetailsLongname",
|
---|
2638 | &detailslongname, sizeof(BOOL));
|
---|
2639 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLongname",
|
---|
2640 | &detailslongname, sizeof(BOOL));
|
---|
2641 | PrfWriteProfileData(fmprof, appname, "DetailsSubject",
|
---|
2642 | &detailssubject, sizeof(BOOL));
|
---|
2643 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSubject",
|
---|
2644 | &detailssubject, sizeof(BOOL));
|
---|
2645 | PrfWriteProfileData(fmprof, appname, "DetailsEA",
|
---|
2646 | &detailsea, sizeof(BOOL));
|
---|
2647 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsEA",
|
---|
2648 | &detailsea, sizeof(BOOL));
|
---|
2649 | PrfWriteProfileData(fmprof, appname, "DetailsSize",
|
---|
2650 | &detailssize, sizeof(BOOL));
|
---|
2651 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsSize",
|
---|
2652 | &detailssize, sizeof(BOOL));
|
---|
2653 | PrfWriteProfileData(fmprof, appname, "DetailsIcon",
|
---|
2654 | &detailsicon, sizeof(BOOL));
|
---|
2655 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsIcon",
|
---|
2656 | &detailsicon, sizeof(BOOL));
|
---|
2657 | PrfWriteProfileData(fmprof, appname, "DetailsLWDate",
|
---|
2658 | &detailslwdate, sizeof(BOOL));
|
---|
2659 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWDate",
|
---|
2660 | &detailslwdate, sizeof(BOOL));
|
---|
2661 | PrfWriteProfileData(fmprof, appname, "DetailsLWTime",
|
---|
2662 | &detailslwtime, sizeof(BOOL));
|
---|
2663 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLWTime",
|
---|
2664 | &detailslwtime, sizeof(BOOL));
|
---|
2665 | PrfWriteProfileData(fmprof, appname, "DetailsLADate",
|
---|
2666 | &detailsladate, sizeof(BOOL));
|
---|
2667 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLADate",
|
---|
2668 | &detailsladate, sizeof(BOOL));
|
---|
2669 | PrfWriteProfileData(fmprof, appname, "DetailsLATime",
|
---|
2670 | &detailslatime, sizeof(BOOL));
|
---|
2671 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsLATime",
|
---|
2672 | &detailslatime, sizeof(BOOL));
|
---|
2673 | PrfWriteProfileData(fmprof, appname, "DetailsCRDate",
|
---|
2674 | &detailscrdate, sizeof(BOOL));
|
---|
2675 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRDate",
|
---|
2676 | &detailscrdate, sizeof(BOOL));
|
---|
2677 | PrfWriteProfileData(fmprof, appname, "DetailsCRTime",
|
---|
2678 | &detailscrtime, sizeof(BOOL));
|
---|
2679 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsCRTime",
|
---|
2680 | &detailscrtime, sizeof(BOOL));
|
---|
2681 | PrfWriteProfileData(fmprof, appname, "DetailsAttr",
|
---|
2682 | &detailsattr, sizeof(BOOL));
|
---|
2683 | PrfWriteProfileData(fmprof, appname, "DirCnr.DetailsAttr",
|
---|
2684 | &detailsattr, sizeof(BOOL));
|
---|
2685 | if (hwndMain) {
|
---|
2686 | if (SaveDirCnrState(hwndMain, GetPString(IDS_FM2TEMPTEXT)) > 0) {
|
---|
2687 | PostMsg(MainObjectHwnd, UM_RESTORE, MPVOID, MPFROMLONG(2));
|
---|
2688 | PostMsg(hwndMain, UM_RESTORE, MPVOID, MPVOID);
|
---|
2689 | }
|
---|
2690 | }
|
---|
2691 | WinSendMsg((HWND) WinQueryWindowULong(hwnd, QWL_USER),
|
---|
2692 | UM_UNDO, MPVOID, MPVOID);
|
---|
2693 | return 0;
|
---|
2694 |
|
---|
2695 | case WM_CLOSE:
|
---|
2696 | break;
|
---|
2697 | }
|
---|
2698 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
2699 | }
|
---|
2700 |
|
---|
2701 | NOTEPAGES np[] = { CFGD_FRAME,
|
---|
2702 | IDS_NOTEDIRCNRS1TEXT,
|
---|
2703 | CfgDDlgProc,
|
---|
2704 | 0,
|
---|
2705 | 0,
|
---|
2706 | 0,
|
---|
2707 | CFG5_FRAME,
|
---|
2708 | IDS_NOTEDIRVIEW1TEXT,
|
---|
2709 | Cfg5DlgProc,
|
---|
2710 | 0,
|
---|
2711 | 0,
|
---|
2712 | 0,
|
---|
2713 | CFG6_FRAME,
|
---|
2714 | IDS_NOTEDIRSORT1TEXT,
|
---|
2715 | Cfg6DlgProc,
|
---|
2716 | 0,
|
---|
2717 | 0,
|
---|
2718 | 0,
|
---|
2719 | CFG5_FRAME,
|
---|
2720 | IDS_NOTECOLVIEW1TEXT,
|
---|
2721 | Cfg7DlgProc,
|
---|
2722 | 0,
|
---|
2723 | 0,
|
---|
2724 | 0,
|
---|
2725 | CFG6_FRAME,
|
---|
2726 | IDS_NOTECOLSORT1TEXT,
|
---|
2727 | Cfg8DlgProc,
|
---|
2728 | 0,
|
---|
2729 | 0,
|
---|
2730 | 0,
|
---|
2731 | CFGA_FRAME,
|
---|
2732 | IDS_NOTEARCHIVER1TEXT,
|
---|
2733 | CfgADlgProc,
|
---|
2734 | 0,
|
---|
2735 | 0,
|
---|
2736 | 0,
|
---|
2737 | CFGT_FRAME,
|
---|
2738 | IDS_NOTETREE1TEXT,
|
---|
2739 | CfgTDlgProc,
|
---|
2740 | 0,
|
---|
2741 | 0,
|
---|
2742 | 0,
|
---|
2743 | CFGTS_FRAME,
|
---|
2744 | IDS_NOTETREESORT1TEXT,
|
---|
2745 | CfgTSDlgProc,
|
---|
2746 | 0,
|
---|
2747 | 0,
|
---|
2748 | 0,
|
---|
2749 | CFGV_FRAME,
|
---|
2750 | IDS_NOTEVIEWERS1TEXT,
|
---|
2751 | CfgVDlgProc,
|
---|
2752 | 0,
|
---|
2753 | 0,
|
---|
2754 | 0,
|
---|
2755 | CFGC_FRAME,
|
---|
2756 | IDS_NOTECOMPARE1TEXT,
|
---|
2757 | CfgCDlgProc,
|
---|
2758 | 0,
|
---|
2759 | 0,
|
---|
2760 | 0,
|
---|
2761 | CFGM_FRAME,
|
---|
2762 | IDS_NOTEMONOLITHIC1TEXT,
|
---|
2763 | CfgMDlgProc,
|
---|
2764 | 0,
|
---|
2765 | 0,
|
---|
2766 | 0,
|
---|
2767 | CFGG_FRAME,
|
---|
2768 | IDS_NOTEGENERAL1TEXT,
|
---|
2769 | CfgGDlgProc,
|
---|
2770 | 0,
|
---|
2771 | 0,
|
---|
2772 | 0,
|
---|
2773 | CFGS_FRAME,
|
---|
2774 | IDS_NOTESCANNING1TEXT,
|
---|
2775 | CfgSDlgProc,
|
---|
2776 | 0,
|
---|
2777 | 0,
|
---|
2778 | 0,
|
---|
2779 | CFGB_FRAME,
|
---|
2780 | IDS_NOTEBUBBLE1TEXT,
|
---|
2781 | CfgBDlgProc,
|
---|
2782 | 0,
|
---|
2783 | 0,
|
---|
2784 | 0,
|
---|
2785 | CFG9_FRAME,
|
---|
2786 | IDS_NOTEQUICK1TEXT,
|
---|
2787 | Cfg9DlgProc,
|
---|
2788 | 0,
|
---|
2789 | 0,
|
---|
2790 | 0,
|
---|
2791 | 0,
|
---|
2792 | 0,
|
---|
2793 | NULL,
|
---|
2794 | 0,
|
---|
2795 | 0,
|
---|
2796 | 0
|
---|
2797 | };
|
---|
2798 |
|
---|
2799 | MRESULT EXPENTRY CfgDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
2800 | {
|
---|
2801 | HWND hwndTemp;
|
---|
2802 | USHORT attrib = BKA_FIRST;
|
---|
2803 | INT x;
|
---|
2804 | ULONG pageID;
|
---|
2805 |
|
---|
2806 | switch (msg) {
|
---|
2807 | case WM_INITDLG:
|
---|
2808 | hwndNotebook = hwnd;
|
---|
2809 | if (mp2) {
|
---|
2810 | if (!strcmp((CHAR *) mp2, "FM/4")) {
|
---|
2811 | x = 0;
|
---|
2812 | while (np[x].frameid && np[x].frameid != CFG9_FRAME)
|
---|
2813 | x++;
|
---|
2814 | np[x].frameid = 0;
|
---|
2815 | }
|
---|
2816 | }
|
---|
2817 | PostMsg(hwnd, UM_SETUP, MPVOID, MPVOID);
|
---|
2818 | WinSendDlgItemMsg(hwnd,
|
---|
2819 | CFG_NOTEBOOK,
|
---|
2820 | BKM_SETDIMENSIONS,
|
---|
2821 | MPFROM2SHORT(82, 24), MPFROMLONG(BKA_MAJORTAB));
|
---|
2822 | WinSendDlgItemMsg(hwnd,
|
---|
2823 | CFG_NOTEBOOK,
|
---|
2824 | BKM_SETDIMENSIONS,
|
---|
2825 | MPFROM2SHORT(20, 20), MPFROMLONG(BKA_PAGEBUTTON));
|
---|
2826 | WinSendDlgItemMsg(hwnd,
|
---|
2827 | CFG_NOTEBOOK,
|
---|
2828 | BKM_SETDIMENSIONS,
|
---|
2829 | MPFROM2SHORT(0, 0), MPFROMLONG(BKA_MINORTAB));
|
---|
2830 | for (x = 0; np[x].frameid; x++) {
|
---|
2831 | hwndTemp = WinLoadDlg(HWND_DESKTOP,
|
---|
2832 | HWND_DESKTOP,
|
---|
2833 | np[x].proc, FM3ModHandle, np[x].frameid, MPVOID);
|
---|
2834 | if (hwndTemp) {
|
---|
2835 | WinSetWindowULong(hwndTemp, QWL_USER, (ULONG) hwnd);
|
---|
2836 | np[x].hwnd = hwndTemp;
|
---|
2837 | np[x].pageID = (ULONG) WinSendDlgItemMsg(hwnd,
|
---|
2838 | CFG_NOTEBOOK,
|
---|
2839 | BKM_INSERTPAGE,
|
---|
2840 | MPFROMLONG(BKA_FIRST),
|
---|
2841 | MPFROM2SHORT(BKA_AUTOPAGESIZE
|
---|
2842 | |
|
---|
2843 | BKA_STATUSTEXTON
|
---|
2844 | | BKA_MAJOR,
|
---|
2845 | attrib));
|
---|
2846 | attrib = BKA_LAST;
|
---|
2847 | WinSendDlgItemMsg(hwnd,
|
---|
2848 | CFG_NOTEBOOK,
|
---|
2849 | BKM_SETPAGEWINDOWHWND,
|
---|
2850 | MPFROMLONG(np[x].pageID), MPFROMLONG(np[x].hwnd));
|
---|
2851 | WinSendDlgItemMsg(hwnd,
|
---|
2852 | CFG_NOTEBOOK,
|
---|
2853 | BKM_SETTABTEXT,
|
---|
2854 | MPFROMLONG(np[x].pageID),
|
---|
2855 | MPFROMP(GetPString(np[x].title)));
|
---|
2856 | WinSendDlgItemMsg(hwnd,
|
---|
2857 | CFG_NOTEBOOK,
|
---|
2858 | BKM_SETSTATUSLINETEXT,
|
---|
2859 | MPFROMLONG(np[x].pageID),
|
---|
2860 | MPFROMP(GetPString(np[x].title + 1)));
|
---|
2861 | }
|
---|
2862 | }
|
---|
2863 | /* see if we've been asked to display quick cfg page */
|
---|
2864 | if (!mp2 ||
|
---|
2865 | strcmp((CHAR *) mp2, "First Time") ||
|
---|
2866 | !x || !np[x - 1].hwnd || !np[x - 1].pageID) {
|
---|
2867 | PostMsg(WinWindowFromID(hwnd, CFG_NOTEBOOK),
|
---|
2868 | BKM_TURNTOPAGE, MPFROMLONG(np[0].pageID), MPVOID);
|
---|
2869 | }
|
---|
2870 | else {
|
---|
2871 | PostMsg(MainObjectHwnd, UM_SETDIR, MPFROMLONG(1L), MPVOID);
|
---|
2872 | PostMsg(WinWindowFromID(hwnd, CFG_NOTEBOOK),
|
---|
2873 | BKM_TURNTOPAGE, MPFROMLONG(np[x - 1].pageID), MPVOID);
|
---|
2874 | PostMsg(hwnd, UM_FOCUSME, MPFROMLONG(np[x - 1].hwnd), MPVOID);
|
---|
2875 | PostMsg(np[x - 1].hwnd, WM_COMMAND, MPFROM2SHORT(IDM_HELP, 0), MPVOID);
|
---|
2876 | }
|
---|
2877 | break;
|
---|
2878 |
|
---|
2879 | case UM_FOCUSME:
|
---|
2880 | if (mp1)
|
---|
2881 | WinSetActiveWindow(HWND_DESKTOP, (HWND) mp1);
|
---|
2882 | break;
|
---|
2883 |
|
---|
2884 | case WM_CONTROL:
|
---|
2885 | switch (SHORT1FROMMP(mp1)) {
|
---|
2886 | case CFG_NOTEBOOK:
|
---|
2887 | switch (SHORT2FROMMP(mp1)) {
|
---|
2888 | case BKN_PAGESELECTED:
|
---|
2889 | if (mp2) {
|
---|
2890 |
|
---|
2891 | PAGESELECTNOTIFY *psn = mp2;
|
---|
2892 |
|
---|
2893 | WinSendDlgItemMsg(hwnd,
|
---|
2894 | CFG_NOTEBOOK,
|
---|
2895 | BKM_QUERYPAGEWINDOWHWND,
|
---|
2896 | MPFROMLONG(psn->ulPageIdNew), MPVOID);
|
---|
2897 | }
|
---|
2898 | break;
|
---|
2899 | }
|
---|
2900 | break;
|
---|
2901 | }
|
---|
2902 | return 0;
|
---|
2903 |
|
---|
2904 | case UM_SETUP:
|
---|
2905 | WinSetActiveWindow(HWND_DESKTOP, WinQueryWindow(hwnd, QW_OWNER));
|
---|
2906 | WinSetActiveWindow(HWND_DESKTOP, hwnd);
|
---|
2907 | return 0;
|
---|
2908 |
|
---|
2909 | case WM_COMMAND:
|
---|
2910 | switch (SHORT1FROMMP(mp1)) {
|
---|
2911 | case DID_OK:
|
---|
2912 | WinDismissDlg(hwnd, 1);
|
---|
2913 | break;
|
---|
2914 |
|
---|
2915 | case DID_CANCEL:
|
---|
2916 | // Tell current page to undo itself in case changed and still alive
|
---|
2917 | pageID = (ULONG) WinSendDlgItemMsg(hwnd,
|
---|
2918 | CFG_NOTEBOOK,
|
---|
2919 | BKM_QUERYPAGEID,
|
---|
2920 | MPFROMLONG(0),
|
---|
2921 | MPFROM2SHORT(BKA_TOP, 0));
|
---|
2922 | hwndTemp = (HWND) WinSendDlgItemMsg(hwnd,
|
---|
2923 | CFG_NOTEBOOK,
|
---|
2924 | BKM_QUERYPAGEWINDOWHWND,
|
---|
2925 | MPFROMLONG(pageID), MPVOID);
|
---|
2926 | if (hwndTemp)
|
---|
2927 | WinSendMsg(hwndTemp, UM_UNDO, MPVOID, MPVOID);
|
---|
2928 |
|
---|
2929 | WinDismissDlg(hwnd, 0);
|
---|
2930 | break;
|
---|
2931 |
|
---|
2932 | case IDM_HELP: /* relay message to appropriate page's window */
|
---|
2933 | pageID = (ULONG) WinSendDlgItemMsg(hwnd,
|
---|
2934 | CFG_NOTEBOOK,
|
---|
2935 | BKM_QUERYPAGEID,
|
---|
2936 | MPFROMLONG(0),
|
---|
2937 | MPFROM2SHORT(BKA_TOP, 0));
|
---|
2938 | hwndTemp = (HWND) WinSendDlgItemMsg(hwnd,
|
---|
2939 | CFG_NOTEBOOK,
|
---|
2940 | BKM_QUERYPAGEWINDOWHWND,
|
---|
2941 | MPFROMLONG(pageID), MPVOID);
|
---|
2942 | if (hwndTemp)
|
---|
2943 | PostMsg(hwndTemp, WM_COMMAND, MPFROM2SHORT(IDM_HELP, 0), MPVOID);
|
---|
2944 | break;
|
---|
2945 | }
|
---|
2946 | return 0;
|
---|
2947 |
|
---|
2948 | case UM_UNDO:
|
---|
2949 | for (x = 0; np[x].frameid; x++) {
|
---|
2950 | if (np[x].hwnd)
|
---|
2951 | WinSendMsg(np[x].hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
2952 | }
|
---|
2953 | break;
|
---|
2954 |
|
---|
2955 | case WM_DESTROY:
|
---|
2956 | if (np[0].frameid) {
|
---|
2957 | for (x = 1; np[x].frameid; x++) {
|
---|
2958 | if (np[x].hwnd) {
|
---|
2959 | WinSendMsg(np[x].hwnd, WM_CLOSE, MPVOID, MPVOID);
|
---|
2960 | np[x].hwnd = (HWND) 0;
|
---|
2961 | np[x].pageID = 0;
|
---|
2962 | }
|
---|
2963 | }
|
---|
2964 | WinSendMsg(np[0].hwnd, WM_CLOSE, MPVOID, MPVOID);
|
---|
2965 | np[0].hwnd = (HWND) 0;
|
---|
2966 | np[0].pageID = 0;
|
---|
2967 | }
|
---|
2968 | hwndNotebook = (HWND) 0;
|
---|
2969 | break;
|
---|
2970 | }
|
---|
2971 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
2972 | }
|
---|
2973 |
|
---|
2974 | #pragma alloc_text(NOTEBOOK,CfgTDlgProc,CfgTSDlgProc,CfgMDlgProc)
|
---|
2975 | #pragma alloc_text(NOTEBOOK2,CfgADlgProc,CfgSDlgProc,CfgVDlgProc)
|
---|
2976 | #pragma alloc_text(NOTEBOOK3,CfgDDlgProc,Cfg5DlgProc,Cfg6DlgProc)
|
---|
2977 | #pragma alloc_text(NOTEBOOK4,Cfg7DlgProc,Cfg8DlgProc,CfgCDlgProc)
|
---|
2978 | #pragma alloc_text(NOTEBOOK5,CfgGDlgProc,CfgDlgProc,CfgBDlgProc)
|
---|
2979 |
|
---|