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