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