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