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