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