[36] | 1 |
|
---|
| 2 | /***********************************************************************
|
---|
| 3 |
|
---|
| 4 | $Id: info.c 1391 2009-01-11 23:55:53Z gyoung $
|
---|
| 5 |
|
---|
[576] | 6 | Info windows
|
---|
[36] | 7 |
|
---|
| 8 | Copyright (c) 1993-98 M. Kimes
|
---|
[907] | 9 | Copyright (c) 2001, 2008 Steven H. Levine
|
---|
[36] | 10 |
|
---|
[131] | 11 | 16 Oct 02 SHL Handle large partitions
|
---|
| 12 | 12 Feb 03 SHL FileInfoProc: standardize EA math
|
---|
| 13 | 01 Aug 04 SHL Rework lstrip/rstrip usage
|
---|
[130] | 14 | 23 May 05 SHL Use QWL_USER
|
---|
[162] | 15 | 25 May 05 SHL Use ULONGLONG and CommaFmtULL
|
---|
[186] | 16 | 05 Jun 05 SHL Use QWL_USER
|
---|
[336] | 17 | 14 Jul 06 SHL Use Runtime_Error
|
---|
[575] | 18 | 24 Mar 07 SHL Correct FileInfoProc binary file detect
|
---|
| 19 | 24 Mar 07 SHL Correct FileInfoProc/IconProc race crash
|
---|
[618] | 20 | 19 Apr 07 SHL Sync with AcceptOneDrop GetOneDrop mods
|
---|
[793] | 21 | 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
|
---|
[805] | 22 | 25 Aug 07 SHL Drop list from FILESTUF - data not static
|
---|
| 23 | 25 Aug 07 SHL IconProc: do not use freed memory - random bad things happen
|
---|
[846] | 24 | 27 Sep 07 SHL Correct ULONGLONG size formatting
|
---|
[897] | 25 | 30 Dec 07 GKY Use CommaFmtULL
|
---|
[985] | 26 | 29 Feb 08 GKY Use xfree where appropriate
|
---|
[1358] | 27 | 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis
|
---|
| 28 | 25 Dec 08 GKY Add DRIVE_RSCANNED flag to monitor for the first recursive drive scan per session
|
---|
| 29 | to prevent duplicate directory names in tree following a copy before initial scan.
|
---|
[1391] | 30 | 11 Jan 08 GKY Add Write verify off and recures scan to drive info display when appropriate.
|
---|
[36] | 31 |
|
---|
| 32 | ***********************************************************************/
|
---|
| 33 |
|
---|
[907] | 34 | #include <stdlib.h>
|
---|
| 35 | #include <string.h>
|
---|
| 36 | #include <ctype.h>
|
---|
| 37 | #include <share.h>
|
---|
| 38 |
|
---|
[2] | 39 | #define INCL_DOS
|
---|
| 40 | #define INCL_WIN
|
---|
| 41 | #define INCL_GPI
|
---|
[162] | 42 | #define INCL_LONGLONG
|
---|
[2] | 43 |
|
---|
[1183] | 44 | #include "fm3dll.h"
|
---|
[1223] | 45 | #include "fm3dll2.h" // #define's for UM_*, control id's, etc.
|
---|
[1208] | 46 | #include "draglist.h" // Data declaration(s)
|
---|
| 47 | #include "notebook.h" // Data declaration(s)
|
---|
| 48 | #include "inis.h" // Data declaration(s)
|
---|
| 49 | #include "init.h" // Data declaration(s)
|
---|
| 50 | #include "mainwnd.h" // Data declaration(s)
|
---|
[2] | 51 | #include "fm3dlg.h"
|
---|
| 52 | #include "fm3str.h"
|
---|
[907] | 53 | #include "makelist.h" // AddToList
|
---|
| 54 | #include "errutil.h" // Dos_Error...
|
---|
| 55 | #include "strutil.h" // GetPString
|
---|
[1160] | 56 | #include "attribs.h" // AttrListDlgProc
|
---|
| 57 | #include "defview.h" // DefaultView
|
---|
| 58 | #include "info.h"
|
---|
[1183] | 59 | #include "valid.h" // CheckDrive, IsBinary
|
---|
[1160] | 60 | #include "seticon.h" // SetIconDlgProc
|
---|
[1183] | 61 | #include "droplist.h" // AcceptOneDrop, DropHelp, GetOneDrop
|
---|
| 62 | #include "eas.h" // DisplayEAsProc
|
---|
| 63 | #include "misc.h" // DrawTargetEmphasis
|
---|
| 64 | #include "notify.h" // Notify
|
---|
| 65 | #include "shadow.h" // OpenObject
|
---|
| 66 | #include "chklist.h" // PopupMenu
|
---|
| 67 | #include "presparm.h" // SetPresParams
|
---|
| 68 | #include "strips.h" // bstrip
|
---|
| 69 | #include "commafmt.h" // CommaFmtULL
|
---|
| 70 | #include "wrappers.h" // xDosFindFirst
|
---|
[1039] | 71 | #include "fortify.h"
|
---|
[2] | 72 |
|
---|
[1208] | 73 | // Data definitions
|
---|
[2] | 74 | #pragma data_seg(DATA1)
|
---|
[336] | 75 | static PSZ pszSrcFile = __FILE__;
|
---|
| 76 |
|
---|
[1208] | 77 | #pragma data_seg(GLOBAL1)
|
---|
| 78 | INT driveflags[26];
|
---|
| 79 |
|
---|
[551] | 80 | CHAR *FlagMsg(CHAR drive, CHAR * buffer)
|
---|
[336] | 81 | {
|
---|
[551] | 82 | ULONG x;
|
---|
| 83 | BOOL once = FALSE;
|
---|
| 84 | register CHAR *p;
|
---|
[2] | 85 |
|
---|
[551] | 86 | if (buffer) {
|
---|
[2] | 87 | *buffer = 0;
|
---|
| 88 | p = buffer;
|
---|
[551] | 89 | if (isalpha(drive)) {
|
---|
| 90 | if (driveflags[toupper(drive) - 'A']) {
|
---|
[1391] | 91 | for (x = IDS_FLREMOVABLETEXT; x < IDS_FLRECURSESCANDONETEXT + 1; x++) {
|
---|
[551] | 92 | if (driveflags[toupper(drive) - 'A'] &
|
---|
| 93 | (1 << (x - IDS_FLREMOVABLETEXT))) {
|
---|
| 94 | if (once) {
|
---|
| 95 | *p = ' ';
|
---|
| 96 | p++;
|
---|
| 97 | }
|
---|
| 98 | else
|
---|
| 99 | once = TRUE;
|
---|
| 100 | *p = '[';
|
---|
| 101 | p++;
|
---|
| 102 | strcpy(p, GetPString(x));
|
---|
| 103 | p += strlen(p);
|
---|
| 104 | *p = ']';
|
---|
| 105 | p++;
|
---|
| 106 | *p = 0;
|
---|
| 107 | }
|
---|
| 108 | }
|
---|
[2] | 109 | }
|
---|
| 110 | else
|
---|
[551] | 111 | strcpy(buffer, "[None]");
|
---|
[2] | 112 | }
|
---|
| 113 | }
|
---|
| 114 | return buffer;
|
---|
| 115 | }
|
---|
| 116 |
|
---|
[551] | 117 | MRESULT EXPENTRY DrvInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
[162] | 118 | {
|
---|
| 119 | CHAR *pszFileName;
|
---|
[551] | 120 | CHAR szMB[20];
|
---|
| 121 | CHAR szKB[20];
|
---|
| 122 | CHAR szUnits[20];
|
---|
[336] | 123 | APIRET rc;
|
---|
[2] | 124 |
|
---|
[551] | 125 | switch (msg) {
|
---|
| 126 | case WM_INITDLG:
|
---|
| 127 | if (mp2) {
|
---|
[2] | 128 |
|
---|
[551] | 129 | CHAR s[CCHMAXPATH * 2];
|
---|
| 130 | ULONG type;
|
---|
[2] | 131 |
|
---|
[1009] | 132 | pszFileName = (CHAR *)mp2;
|
---|
[551] | 133 | WinSetWindowPtr(hwnd, QWL_USER, (PVOID) pszFileName);
|
---|
| 134 | WinSendDlgItemMsg(hwnd,
|
---|
| 135 | INFO_LABEL,
|
---|
| 136 | EM_SETTEXTLIMIT,
|
---|
| 137 | MPFROM2SHORT(CCHMAXPATHCOMP, 0), MPVOID);
|
---|
[552] | 138 | if (!(driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOSTATS)){
|
---|
[551] | 139 | WinSendDlgItemMsg(hwnd,
|
---|
| 140 | INFO_FREE,
|
---|
| 141 | SLM_SETSLIDERINFO,
|
---|
| 142 | MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS, 0),
|
---|
| 143 | MPFROM2SHORT(0, 0));
|
---|
| 144 | WinSendDlgItemMsg(hwnd,
|
---|
| 145 | INFO_USED,
|
---|
| 146 | SLM_SETSLIDERINFO,
|
---|
| 147 | MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS, 0),
|
---|
| 148 | MPFROM2SHORT(0, 0));
|
---|
[552] | 149 | }
|
---|
[551] | 150 | if (driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOTWRITEABLE) {
|
---|
| 151 | WinSendDlgItemMsg(hwnd,
|
---|
| 152 | INFO_LABEL,
|
---|
| 153 | EM_SETREADONLY, MPFROM2SHORT(TRUE, 0), MPVOID);
|
---|
| 154 | WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, DID_OK));
|
---|
| 155 | }
|
---|
| 156 | if (IsFullName(pszFileName)) {
|
---|
[2] | 157 |
|
---|
[551] | 158 | CHAR FileSystem[CCHMAXPATH * 2];
|
---|
[2] | 159 |
|
---|
[551] | 160 | sprintf(FileSystem,
|
---|
| 161 | GetPString(IDS_DRIVEINFOTITLETEXT), toupper(*pszFileName));
|
---|
| 162 | WinSetWindowText(hwnd, FileSystem);
|
---|
[575] | 163 | if (CheckDrive(toupper(*pszFileName), FileSystem, &type) != -1){
|
---|
[2] | 164 |
|
---|
[551] | 165 | FSALLOCATE fsa;
|
---|
[2] | 166 |
|
---|
[552] | 167 | if (type & (DRIVE_REMOTE | DRIVE_ZIPSTREAM | DRIVE_VIRTUAL)) {
|
---|
[2] | 168 |
|
---|
[551] | 169 | CHAR Path[3], *pfsn, *pfsd;
|
---|
| 170 | ULONG Size;
|
---|
| 171 | APIRET rc;
|
---|
| 172 | PFSQBUFFER2 pfsq;
|
---|
[2] | 173 |
|
---|
[551] | 174 | Path[0] = toupper(*pszFileName);
|
---|
| 175 | Path[1] = ':';
|
---|
| 176 | Path[2] = 0;
|
---|
| 177 | Size = sizeof(s);
|
---|
| 178 | DosError(FERR_DISABLEHARDERR);
|
---|
| 179 | rc = DosQueryFSAttach(Path,
|
---|
| 180 | 0, FSAIL_QUERYNAME, (PFSQBUFFER2) s, &Size);
|
---|
| 181 | if (!rc) {
|
---|
| 182 | pfsq = (PFSQBUFFER2) s;
|
---|
[689] | 183 | pfsn = (PCHAR)(pfsq->szName) + pfsq->cbName + 1;
|
---|
[551] | 184 | pfsd = pfsn + pfsq->cbFSDName + 1;
|
---|
| 185 | if (pfsq->cbFSAData && pfsd && *pfsd) {
|
---|
| 186 | sprintf(s, " (%s)", pfsd);
|
---|
| 187 | WinSetDlgItemText(hwnd, INFO_REALPATH, s);
|
---|
| 188 | }
|
---|
| 189 | }
|
---|
| 190 | }
|
---|
[2] | 191 |
|
---|
[551] | 192 | DosError(FERR_DISABLEHARDERR);
|
---|
| 193 | if (!DosQueryFSInfo(toupper(*pszFileName) - '@',
|
---|
| 194 | FSIL_ALLOC, &fsa, sizeof(FSALLOCATE))) {
|
---|
[2] | 195 |
|
---|
[551] | 196 | struct
|
---|
| 197 | {
|
---|
| 198 | ULONG serial;
|
---|
| 199 | CHAR volumelength;
|
---|
| 200 | CHAR volumelabel[CCHMAXPATH];
|
---|
| 201 | }
|
---|
| 202 | volser;
|
---|
| 203 | USHORT percentfree, percentused;
|
---|
[2] | 204 |
|
---|
[551] | 205 | memset(&volser, 0, sizeof(volser));
|
---|
| 206 | DosError(FERR_DISABLEHARDERR);
|
---|
| 207 | if (!DosQueryFSInfo(toupper(*pszFileName) - '@',
|
---|
| 208 | FSIL_VOLSER,
|
---|
| 209 | &volser, (ULONG) sizeof(volser))) {
|
---|
| 210 | WinSetDlgItemText(hwnd, INFO_FS, FileSystem);
|
---|
| 211 | WinSetDlgItemText(hwnd, INFO_LABEL, volser.volumelabel);
|
---|
| 212 | sprintf(s, "%lx", volser.serial);
|
---|
[575] | 213 | WinSetDlgItemText(hwnd, INFO_SERIAL, s);
|
---|
| 214 | FlagMsg(*pszFileName, s);
|
---|
[552] | 215 | WinSetDlgItemText(hwnd, INFO_FLAGS, s);
|
---|
[575] | 216 | if (!(driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOSTATS)){
|
---|
[551] | 217 | CommaFmtULL(szMB, sizeof(szMB),
|
---|
| 218 | (ULONGLONG) fsa.cUnit *
|
---|
| 219 | (fsa.cSectorUnit * fsa.cbSector), 'M');
|
---|
| 220 | CommaFmtULL(szKB, sizeof(szKB),
|
---|
| 221 | (ULONGLONG) fsa.cUnit *
|
---|
| 222 | (fsa.cSectorUnit * fsa.cbSector), 'K');
|
---|
| 223 | CommaFmtULL(szUnits, sizeof(szUnits),
|
---|
| 224 | (ULONGLONG) fsa.cUnit, ' ');
|
---|
| 225 | sprintf(s, "%s, %s, %s %s%s", szMB, szKB, szUnits, GetPString(IDS_UNITTEXT), &"s"[fsa.cUnit == 1L]); // hack cough
|
---|
| 226 | WinSetDlgItemText(hwnd, INFO_TOTAL, s);
|
---|
[162] | 227 |
|
---|
[551] | 228 | CommaFmtULL(szMB, sizeof(szMB),
|
---|
| 229 | (ULONGLONG) fsa.cUnitAvail *
|
---|
| 230 | (fsa.cSectorUnit * fsa.cbSector), 'M');
|
---|
| 231 | CommaFmtULL(szKB, sizeof(szKB),
|
---|
| 232 | (ULONGLONG) fsa.cUnitAvail *
|
---|
| 233 | (fsa.cSectorUnit * fsa.cbSector), 'K');
|
---|
| 234 | CommaFmtULL(szUnits, sizeof(szUnits),
|
---|
| 235 | (ULONGLONG) fsa.cUnitAvail, ' ');
|
---|
| 236 | sprintf(s,
|
---|
| 237 | "%s, %s, %s %s%s",
|
---|
| 238 | szMB, szKB, szUnits,
|
---|
| 239 | GetPString(IDS_UNITTEXT), &"s"[fsa.cUnitAvail == 1L]);
|
---|
| 240 | WinSetDlgItemText(hwnd, INFO_AVAILABLE, s);
|
---|
| 241 | sprintf(s,
|
---|
| 242 | GetPString(IDS_SECTORSTEXT),
|
---|
| 243 | fsa.cbSector,
|
---|
| 244 | fsa.cSectorUnit, &"s"[fsa.cSectorUnit == 1L]);
|
---|
| 245 | WinSetDlgItemText(hwnd, INFO_ALLOCUNITS, s);
|
---|
[552] | 246 |
|
---|
[551] | 247 | percentfree = (fsa.cUnitAvail && fsa.cUnit) ?
|
---|
| 248 | (fsa.cUnitAvail * 100) / fsa.cUnit : 0;
|
---|
| 249 | if (!percentfree && fsa.cUnitAvail)
|
---|
| 250 | percentfree = 1;
|
---|
| 251 | percentused = 100 - percentfree;
|
---|
| 252 | WinSendDlgItemMsg(hwnd,
|
---|
| 253 | INFO_USED,
|
---|
| 254 | SLM_SETSLIDERINFO,
|
---|
| 255 | MPFROM2SHORT(SMA_SLIDERARMPOSITION,
|
---|
| 256 | SMA_INCREMENTVALUE),
|
---|
| 257 | MPFROMSHORT(percentused));
|
---|
| 258 | WinSendDlgItemMsg(hwnd,
|
---|
| 259 | INFO_FREE,
|
---|
| 260 | SLM_SETSLIDERINFO,
|
---|
| 261 | MPFROM2SHORT(SMA_SLIDERARMPOSITION,
|
---|
| 262 | SMA_INCREMENTVALUE),
|
---|
| 263 | MPFROMSHORT(percentfree));
|
---|
| 264 | sprintf(s, "%u%%", percentused);
|
---|
| 265 | WinSetDlgItemText(hwnd, INFO_USEDPERCENT, s);
|
---|
| 266 | sprintf(s, "%u%%", percentfree);
|
---|
[575] | 267 | WinSetDlgItemText(hwnd, INFO_FREEPERCENT, s);
|
---|
| 268 | }
|
---|
| 269 | else
|
---|
| 270 | WinSetDlgItemText(hwnd, INFO_AVAILABLE, GetPString(IDS_STATSMEANINGLESSTEXT));
|
---|
[551] | 271 | }
|
---|
| 272 | else {
|
---|
| 273 | sprintf(FileSystem,
|
---|
| 274 | GetPString(IDS_CANTQUERYVOLTEXT),
|
---|
| 275 | toupper(*pszFileName));
|
---|
| 276 | Notify(FileSystem);
|
---|
| 277 | WinDismissDlg(hwnd, 0);
|
---|
| 278 | }
|
---|
| 279 | }
|
---|
| 280 | else {
|
---|
| 281 | sprintf(FileSystem,
|
---|
| 282 | GetPString(IDS_CANTQUERYALLOCTEXT),
|
---|
| 283 | toupper(*pszFileName));
|
---|
| 284 | Notify(FileSystem);
|
---|
| 285 | WinDismissDlg(hwnd, 0);
|
---|
| 286 | }
|
---|
| 287 | }
|
---|
| 288 | else {
|
---|
| 289 | FlagMsg(*pszFileName, s);
|
---|
| 290 | sprintf(FileSystem,
|
---|
| 291 | GetPString(IDS_DRIVEINACCESSIBLETEXT),
|
---|
| 292 | toupper(*pszFileName), s);
|
---|
| 293 | Notify(FileSystem);
|
---|
| 294 | WinDismissDlg(hwnd, 0);
|
---|
| 295 | }
|
---|
[2] | 296 | }
|
---|
[551] | 297 | else {
|
---|
| 298 | WinDismissDlg(hwnd, 0);
|
---|
| 299 | }
|
---|
| 300 | }
|
---|
| 301 | else
|
---|
| 302 | WinDismissDlg(hwnd, 0);
|
---|
| 303 | break;
|
---|
[2] | 304 |
|
---|
[551] | 305 | case WM_CONTROL:
|
---|
| 306 | return 0;
|
---|
[2] | 307 |
|
---|
[551] | 308 | case WM_COMMAND:
|
---|
| 309 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 310 | case DID_CANCEL:
|
---|
| 311 | WinDismissDlg(hwnd, 0);
|
---|
| 312 | break;
|
---|
[2] | 313 |
|
---|
[551] | 314 | case IDM_HELP:
|
---|
| 315 | if (hwndHelp)
|
---|
| 316 | WinSendMsg(hwndHelp,
|
---|
| 317 | HM_DISPLAY_HELP,
|
---|
| 318 | MPFROM2SHORT(HELP_DRVINFO, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
| 319 | break;
|
---|
[2] | 320 |
|
---|
[551] | 321 | case DID_OK:
|
---|
| 322 | pszFileName = INSTDATA(hwnd);
|
---|
| 323 | if (!(driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOTWRITEABLE)) {
|
---|
[2] | 324 |
|
---|
[551] | 325 | CHAR s[CCHMAXPATHCOMP + 3];
|
---|
[2] | 326 |
|
---|
[551] | 327 | *s = 0;
|
---|
| 328 | WinQueryDlgItemText(hwnd, INFO_LABEL, CCHMAXPATHCOMP, s);
|
---|
| 329 | bstrip(s);
|
---|
| 330 | if (*s) {
|
---|
| 331 | struct
|
---|
| 332 | {
|
---|
| 333 | ULONG serial;
|
---|
| 334 | CHAR volumelength;
|
---|
| 335 | CHAR volumelabel[CCHMAXPATH];
|
---|
| 336 | }
|
---|
| 337 | volser;
|
---|
[2] | 338 |
|
---|
[551] | 339 | memset(&volser, 0, sizeof(volser));
|
---|
| 340 | DosError(FERR_DISABLEHARDERR);
|
---|
| 341 | if (!DosQueryFSInfo(toupper(*pszFileName) - '@',
|
---|
| 342 | FSIL_VOLSER,
|
---|
| 343 | &volser,
|
---|
| 344 | (ULONG) sizeof(volser)) &&
|
---|
| 345 | stricmp(s, volser.volumelabel)) {
|
---|
| 346 | memmove(s + 1, s, strlen(s) + 1);
|
---|
| 347 | *s = strlen(s + 1);
|
---|
| 348 | DosError(FERR_DISABLEHARDERR);
|
---|
| 349 | rc = DosSetFSInfo(toupper(*pszFileName) - '@',
|
---|
| 350 | 2L, (PVOID) s, (ULONG) sizeof(s));
|
---|
| 351 | if (rc) {
|
---|
| 352 | Dos_Error(MB_CANCEL, rc, hwnd, __FILE__, __LINE__,
|
---|
| 353 | "DosSetFSInfo failed");
|
---|
| 354 | }
|
---|
| 355 | }
|
---|
| 356 | }
|
---|
[2] | 357 | }
|
---|
[551] | 358 | WinDismissDlg(hwnd, 1);
|
---|
| 359 | break;
|
---|
| 360 | }
|
---|
| 361 | return 0;
|
---|
[2] | 362 | }
|
---|
[551] | 363 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
[2] | 364 | }
|
---|
| 365 |
|
---|
[575] | 366 | typedef struct {
|
---|
[2] | 367 | USHORT size;
|
---|
[551] | 368 | CHAR szFileName[CCHMAXPATH];
|
---|
| 369 | BOOL madechanges;
|
---|
[575] | 370 | } FILESTUF;
|
---|
[2] | 371 |
|
---|
[575] | 372 | typedef struct {
|
---|
| 373 | USHORT size;
|
---|
| 374 | PFNWP oldproc;
|
---|
| 375 | FILESTUF *pfs;
|
---|
| 376 | HWND lasthwndMenu;
|
---|
| 377 | } ICONSTUF;
|
---|
| 378 |
|
---|
[2] | 379 | /*
|
---|
| 380 | * subclass routine to allow changing a program's icon
|
---|
| 381 | */
|
---|
| 382 |
|
---|
[551] | 383 | MRESULT EXPENTRY IconProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
[162] | 384 | {
|
---|
[575] | 385 | ICONSTUF *pis = (ICONSTUF *)WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 386 | MRESULT mr;
|
---|
| 387 | CHAR *p;
|
---|
| 388 |
|
---|
[2] | 389 | static BOOL emphasized = FALSE;
|
---|
| 390 |
|
---|
[575] | 391 | if (!pis) {
|
---|
| 392 | Runtime_Error(pszSrcFile, __LINE__, "no data");
|
---|
| 393 | if (msg != WM_DESTROY)
|
---|
| 394 | return WinDefWindowProc(hwnd, msg, mp1, mp2);
|
---|
| 395 | }
|
---|
[2] | 396 |
|
---|
[551] | 397 | switch (msg) {
|
---|
| 398 | case DM_DRAGOVER:
|
---|
| 399 | if (!emphasized) {
|
---|
| 400 | emphasized = TRUE;
|
---|
| 401 | DrawTargetEmphasis(hwnd, emphasized);
|
---|
| 402 | }
|
---|
[618] | 403 | if (AcceptOneDrop(hwnd, mp1, mp2))
|
---|
[551] | 404 | return MRFROM2SHORT(DOR_DROP, DO_MOVE);
|
---|
| 405 | return MRFROM2SHORT(DOR_NEVERDROP, 0);
|
---|
[2] | 406 |
|
---|
[551] | 407 | case DM_DRAGLEAVE:
|
---|
| 408 | emphasized = FALSE;
|
---|
| 409 | DrawTargetEmphasis(hwnd, emphasized);
|
---|
| 410 | break;
|
---|
[2] | 411 |
|
---|
[551] | 412 | case DM_DROPHELP:
|
---|
| 413 | DropHelp(mp1, mp2, hwnd, GetPString(IDS_DROPCHGICONHELPTEXT));
|
---|
| 414 | return 0;
|
---|
[2] | 415 |
|
---|
[551] | 416 | case DM_DROP:
|
---|
| 417 | {
|
---|
| 418 | HPOINTER hptr;
|
---|
| 419 | CHAR szFrom[CCHMAXPATH + 2];
|
---|
| 420 | ICONINFO ici;
|
---|
[2] | 421 |
|
---|
[551] | 422 | emphasized = FALSE;
|
---|
| 423 | DrawTargetEmphasis(hwnd, emphasized);
|
---|
[618] | 424 | if (GetOneDrop(hwnd, mp1, mp2, szFrom, sizeof(szFrom))) {
|
---|
[551] | 425 | memset(&ici, 0, sizeof(ICONINFO));
|
---|
| 426 | ici.cb = sizeof(ICONINFO);
|
---|
| 427 | ici.fFormat = ICON_FILE;
|
---|
| 428 | ici.pszFileName = szFrom;
|
---|
[575] | 429 | if (!WinSetFileIcon((PSZ) pis->pfs->szFileName, (PICONINFO) & ici)) {
|
---|
[551] | 430 | ici.fFormat = ICON_CLEAR;
|
---|
[575] | 431 | WinSetFileIcon((PSZ) pis->pfs->szFileName, (PICONINFO) & ici);
|
---|
[551] | 432 | }
|
---|
[575] | 433 | hptr = WinLoadFileIcon(pis->pfs->szFileName, FALSE);
|
---|
[551] | 434 | if (!hptr)
|
---|
[575] | 435 | hptr = (!IsFile(pis->pfs->szFileName)) ? hptrDir : hptrFile;
|
---|
| 436 | if (pis && pis->oldproc) {
|
---|
[551] | 437 | WinShowWindow(hwnd, FALSE);
|
---|
[575] | 438 | pis->oldproc(hwnd, SM_SETHANDLE, MPFROMLONG(hptr), MPVOID);
|
---|
[551] | 439 | WinShowWindow(hwnd, TRUE);
|
---|
| 440 | WinInvalidateRect(WinQueryWindow(hwnd, QW_PARENT), NULL, TRUE);
|
---|
| 441 | }
|
---|
[2] | 442 | }
|
---|
[551] | 443 | }
|
---|
| 444 | return 0;
|
---|
[2] | 445 |
|
---|
[551] | 446 | case WM_PAINT:
|
---|
[575] | 447 | mr = pis->oldproc(hwnd, msg, mp1, mp2);
|
---|
| 448 | PaintRecessedWindow(hwnd, (HPS) 0, FALSE, FALSE);
|
---|
| 449 | return mr;
|
---|
[551] | 450 | break;
|
---|
[2] | 451 |
|
---|
[551] | 452 | case WM_MENUEND:
|
---|
[575] | 453 | if (pis->lasthwndMenu == (HWND)mp2)
|
---|
| 454 | WinDestroyWindow(pis->lasthwndMenu);
|
---|
| 455 | pis->lasthwndMenu = (HWND) 0;
|
---|
[551] | 456 | break;
|
---|
[2] | 457 |
|
---|
[551] | 458 | case WM_CONTEXTMENU:
|
---|
[575] | 459 | if (pis->lasthwndMenu)
|
---|
| 460 | WinDestroyWindow(pis->lasthwndMenu);
|
---|
| 461 | pis->lasthwndMenu = WinLoadMenu(hwnd, FM3ModHandle, FLE_FRAME);
|
---|
| 462 | if (pis->lasthwndMenu) {
|
---|
| 463 | p = strrchr(pis->pfs->szFileName, '.');
|
---|
| 464 | if (!p || (stricmp(p, ".ICO") && stricmp(p, ".PTR")))
|
---|
| 465 | WinSendMsg(pis->lasthwndMenu,
|
---|
| 466 | MM_DELETEITEM,
|
---|
| 467 | MPFROM2SHORT(IDM_SELECTALL, TRUE), MPVOID);
|
---|
| 468 | PopupMenu(hwnd, hwnd, pis->lasthwndMenu);
|
---|
[551] | 469 | }
|
---|
| 470 | break;
|
---|
| 471 |
|
---|
| 472 | case WM_COMMAND:
|
---|
| 473 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 474 | case IDM_SELECTALL:
|
---|
| 475 | case IDM_DESELECTALL:
|
---|
| 476 | WinDlgBox(HWND_DESKTOP,
|
---|
| 477 | hwnd,
|
---|
| 478 | SetIconDlgProc,
|
---|
| 479 | FM3ModHandle,
|
---|
| 480 | SETICON_FRAME,
|
---|
| 481 | (PVOID) ((SHORT1FROMMP(mp1) == IDM_SELECTALL) ?
|
---|
[575] | 482 | pis->pfs->szFileName : NULL));
|
---|
[2] | 483 | break;
|
---|
[551] | 484 | }
|
---|
| 485 | return 0;
|
---|
[2] | 486 |
|
---|
[551] | 487 | case WM_DESTROY:
|
---|
| 488 | emphasized = FALSE;
|
---|
[575] | 489 | if (!pis)
|
---|
| 490 | return WinDefWindowProc(hwnd, msg, mp1, mp2);
|
---|
[576] | 491 | else {
|
---|
[805] | 492 | PFNWP oldproc = pis->oldproc;
|
---|
[576] | 493 | if (pis->lasthwndMenu)
|
---|
[805] | 494 | WinDestroyWindow(pis->lasthwndMenu);
|
---|
[1039] | 495 | free(pis);
|
---|
[805] | 496 | return oldproc(hwnd, msg, mp1, mp2);
|
---|
[576] | 497 | }
|
---|
[551] | 498 | break;
|
---|
[2] | 499 | }
|
---|
| 500 |
|
---|
[575] | 501 | return pis->oldproc(hwnd, msg, mp1, mp2);
|
---|
[2] | 502 | }
|
---|
| 503 |
|
---|
[551] | 504 | MRESULT EXPENTRY FileInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
[336] | 505 | {
|
---|
[575] | 506 | FILESTUF *pfs;
|
---|
| 507 | ICONSTUF *pis;
|
---|
[805] | 508 | CHAR **ppsz;
|
---|
[2] | 509 |
|
---|
[551] | 510 | switch (msg) {
|
---|
| 511 | case WM_INITDLG:
|
---|
| 512 | if (!mp2) {
|
---|
| 513 | WinDismissDlg(hwnd, 1);
|
---|
| 514 | break;
|
---|
| 515 | }
|
---|
[575] | 516 | pfs = xmallocz(sizeof(FILESTUF), pszSrcFile, __LINE__);
|
---|
| 517 | if (!pfs) {
|
---|
[551] | 518 | WinDismissDlg(hwnd, 1);
|
---|
| 519 | break;
|
---|
| 520 | }
|
---|
[575] | 521 | pfs->size = sizeof(FILESTUF);
|
---|
| 522 | WinSetWindowPtr(hwnd, QWL_USER, pfs);
|
---|
[551] | 523 | {
|
---|
| 524 | USHORT ids[] = { FLE_SIZES, FLE_SLACK, FLE_LASTWRITE, FLE_CREATE,
|
---|
| 525 | FLE_LASTACCESS, 0
|
---|
| 526 | };
|
---|
| 527 | INT x;
|
---|
| 528 | CHAR s[CCHMAXPATH];
|
---|
| 529 |
|
---|
[805] | 530 | ppsz = (CHAR **)mp2;
|
---|
| 531 | for (x = 0; ppsz[x]; x++) {
|
---|
| 532 | if (DosQueryPathInfo(ppsz[x], FIL_QUERYFULLNAME, s, sizeof(s)))
|
---|
| 533 | strcpy(s, ppsz[x]);
|
---|
[551] | 534 | WinSendDlgItemMsg(hwnd,
|
---|
| 535 | FLE_NAME,
|
---|
| 536 | LM_INSERTITEM,
|
---|
| 537 | MPFROM2SHORT(LIT_SORTASCENDING, 0), MPFROMP(s));
|
---|
[2] | 538 | }
|
---|
[551] | 539 | if (!x) {
|
---|
| 540 | WinDismissDlg(hwnd, 1);
|
---|
| 541 | break;
|
---|
[2] | 542 | }
|
---|
[551] | 543 | WinSendDlgItemMsg(hwnd,
|
---|
| 544 | FLE_NAME,
|
---|
| 545 | LM_SELECTITEM, MPFROM2SHORT(0, 0), MPFROMSHORT(TRUE));
|
---|
| 546 | for (x = 0; ids[x]; x++)
|
---|
| 547 | SetPresParams(WinWindowFromID(hwnd, ids[x]),
|
---|
| 548 | &RGBGREY, &RGBBLACK, &RGBBLACK, NULL);
|
---|
| 549 | }
|
---|
[575] | 550 | pis = xmallocz(sizeof(ICONSTUF), pszSrcFile, __LINE__);
|
---|
| 551 | if (!pis) {
|
---|
| 552 | WinDismissDlg(hwnd, 1);
|
---|
| 553 | break;
|
---|
| 554 | }
|
---|
| 555 | WinSetWindowPtr(WinWindowFromID(hwnd, FLE_ICON), QWL_USER, (PVOID) pis);
|
---|
| 556 | pis->size = sizeof(ICONSTUF);
|
---|
| 557 | pis->pfs = pfs;
|
---|
| 558 | pis->oldproc = WinSubclassWindow(WinWindowFromID(hwnd, FLE_ICON),
|
---|
[551] | 559 | IconProc);
|
---|
| 560 | break;
|
---|
[2] | 561 |
|
---|
[551] | 562 | case WM_CONTROL:
|
---|
| 563 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 564 | case FLE_READONLY:
|
---|
| 565 | case FLE_ARCHIVED:
|
---|
| 566 | case FLE_SYSTEM:
|
---|
| 567 | case FLE_HIDDEN:
|
---|
| 568 | switch (SHORT2FROMMP(mp1)) {
|
---|
| 569 | case BN_CLICKED:
|
---|
[575] | 570 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 571 | if (pfs && *pfs->szFileName) {
|
---|
[551] | 572 |
|
---|
| 573 | LISTINFO li;
|
---|
[907] | 574 | UINT numfiles = 0, numalloc = 0;
|
---|
[551] | 575 |
|
---|
| 576 | memset(&li, 0, sizeof(LISTINFO));
|
---|
[575] | 577 | if (!AddToList(pfs->szFileName, &li.list, &numfiles, &numalloc)) {
|
---|
[551] | 578 | if (WinDlgBox(HWND_DESKTOP,
|
---|
| 579 | hwnd,
|
---|
| 580 | AttrListDlgProc,
|
---|
| 581 | FM3ModHandle,
|
---|
| 582 | ATR_FRAME, MPFROMP(&li)) && li.list && li.list[0]) {
|
---|
[575] | 583 | pfs->madechanges = TRUE;
|
---|
[551] | 584 | WinSendMsg(hwnd, UM_SETDIR, MPVOID, MPVOID);
|
---|
| 585 | }
|
---|
| 586 | FreeList(li.list);
|
---|
| 587 | }
|
---|
| 588 | }
|
---|
| 589 | break;
|
---|
[805] | 590 | } // switch
|
---|
[2] | 591 | break;
|
---|
[551] | 592 | case FLE_NAME:
|
---|
| 593 | switch (SHORT2FROMMP(mp1)) {
|
---|
| 594 | case LN_ENTER:
|
---|
| 595 | case LN_SELECT:
|
---|
[575] | 596 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 597 | if (!pfs) {
|
---|
[551] | 598 | Runtime_Error(pszSrcFile, __LINE__, "no data");
|
---|
| 599 | WinDismissDlg(hwnd, 1);
|
---|
| 600 | }
|
---|
| 601 | else {
|
---|
[2] | 602 |
|
---|
[551] | 603 | SHORT sSelect;
|
---|
[2] | 604 |
|
---|
[551] | 605 | sSelect = (SHORT) WinSendDlgItemMsg(hwnd,
|
---|
| 606 | FLE_NAME,
|
---|
| 607 | LM_QUERYSELECTION,
|
---|
| 608 | MPFROMSHORT(LIT_FIRST), MPVOID);
|
---|
| 609 | if (sSelect >= 0) {
|
---|
[575] | 610 | *pfs->szFileName = 0;
|
---|
[551] | 611 | WinSendDlgItemMsg(hwnd,
|
---|
| 612 | FLE_NAME,
|
---|
| 613 | LM_QUERYITEMTEXT,
|
---|
| 614 | MPFROM2SHORT(sSelect, CCHMAXPATH),
|
---|
[575] | 615 | MPFROMP(pfs->szFileName));
|
---|
| 616 | if (*pfs->szFileName) {
|
---|
[551] | 617 | if (SHORT2FROMMP(mp1) == LN_SELECT)
|
---|
| 618 | WinSendMsg(hwnd, UM_SETDIR, MPVOID, MPVOID);
|
---|
| 619 | else
|
---|
| 620 | DefaultView(hwnd,
|
---|
[575] | 621 | (HWND) 0, (HWND) 0, NULL, 32, pfs->szFileName);
|
---|
[551] | 622 | }
|
---|
| 623 | }
|
---|
| 624 | }
|
---|
| 625 | break;
|
---|
| 626 | }
|
---|
| 627 | break;
|
---|
| 628 | }
|
---|
| 629 | return 0;
|
---|
[2] | 630 |
|
---|
[551] | 631 | case UM_SETDIR:
|
---|
| 632 | WinCheckButton(hwnd, FLE_READONLY, FALSE);
|
---|
| 633 | WinCheckButton(hwnd, FLE_ARCHIVED, FALSE);
|
---|
| 634 | WinCheckButton(hwnd, FLE_SYSTEM, FALSE);
|
---|
| 635 | WinCheckButton(hwnd, FLE_HIDDEN, FALSE);
|
---|
| 636 | WinCheckButton(hwnd, FLE_DIRECTORY, FALSE);
|
---|
| 637 | WinCheckButton(hwnd, FLE_READABLE, FALSE);
|
---|
| 638 | WinCheckButton(hwnd, FLE_WRITEABLE, FALSE);
|
---|
| 639 | WinCheckButton(hwnd, FLE_OPEN, FALSE);
|
---|
| 640 | WinCheckButton(hwnd, FLE_BINARY, FALSE);
|
---|
| 641 | WinCheckButton(hwnd, FLE_ISARCHIVE, FALSE);
|
---|
| 642 | WinSetDlgItemText(hwnd, FLE_ARCNAME, NullStr);
|
---|
| 643 | WinCheckButton(hwnd, FLE_OS2FS, FALSE);
|
---|
| 644 | WinCheckButton(hwnd, FLE_OS2WIN, FALSE);
|
---|
| 645 | WinCheckButton(hwnd, FLE_OS2PM, FALSE);
|
---|
| 646 | WinCheckButton(hwnd, FLE_DOS, FALSE);
|
---|
| 647 | WinCheckButton(hwnd, FLE_32BIT, FALSE);
|
---|
| 648 | WinCheckButton(hwnd, FLE_WINREAL, FALSE);
|
---|
| 649 | WinCheckButton(hwnd, FLE_WINPROT, FALSE);
|
---|
| 650 | WinCheckButton(hwnd, FLE_WINENH, FALSE);
|
---|
| 651 | WinCheckButton(hwnd, FLE_DLL, FALSE);
|
---|
| 652 | WinCheckButton(hwnd, FLE_PHYSDRV, FALSE);
|
---|
| 653 | WinCheckButton(hwnd, FLE_VIRTDRV, FALSE);
|
---|
| 654 | WinCheckButton(hwnd, FLE_PROTDLL, FALSE);
|
---|
[575] | 655 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 656 | if (pfs && *pfs->szFileName) {
|
---|
[551] | 657 | CHAR s[97];
|
---|
[897] | 658 | CHAR szCmmaFmtFileSize[81], szCmmaFmtEASize[81];
|
---|
| 659 | CHAR szCmmaFmtFileEASize[81], szCmmaFmtFileEASizeK[81];
|
---|
[841] | 660 | FILEFINDBUF4L fs;
|
---|
[551] | 661 | HDIR hdir = HDIR_CREATE;
|
---|
[841] | 662 | ULONG apptype = 1;
|
---|
[551] | 663 | FILE *fp;
|
---|
| 664 | HPOINTER hptr;
|
---|
| 665 | ARC_TYPE *info;
|
---|
[2] | 666 |
|
---|
[551] | 667 | DosError(FERR_DISABLEHARDERR);
|
---|
[838] | 668 | if (xDosFindFirst(pfs->szFileName,
|
---|
| 669 | &hdir,
|
---|
| 670 | FILE_NORMAL | FILE_ARCHIVED |
|
---|
| 671 | FILE_DIRECTORY | FILE_READONLY | FILE_HIDDEN |
|
---|
| 672 | FILE_SYSTEM,
|
---|
[841] | 673 | &fs, sizeof(fs), &apptype, FIL_QUERYEASIZEL)) {
|
---|
[551] | 674 | // Not found
|
---|
| 675 | SHORT sSelect, numitems;
|
---|
[2] | 676 |
|
---|
[551] | 677 | DosBeep(250, 100); // Wake up user
|
---|
| 678 | sSelect = (SHORT) WinSendDlgItemMsg(hwnd,
|
---|
| 679 | FLE_NAME,
|
---|
| 680 | LM_QUERYSELECTION,
|
---|
| 681 | MPFROMSHORT(LIT_FIRST), MPVOID);
|
---|
| 682 | if (sSelect >= 0) {
|
---|
| 683 | WinSendDlgItemMsg(hwnd,
|
---|
| 684 | FLE_NAME,
|
---|
| 685 | LM_DELETEITEM, MPFROMSHORT(sSelect), MPVOID);
|
---|
| 686 | numitems = (SHORT) WinSendDlgItemMsg(hwnd,
|
---|
| 687 | FLE_NAME,
|
---|
| 688 | LM_QUERYITEMCOUNT,
|
---|
| 689 | MPVOID, MPVOID);
|
---|
| 690 | if (numitems)
|
---|
| 691 | PostMsg(WinWindowFromID(hwnd, FLE_NAME),
|
---|
| 692 | LM_SELECTITEM,
|
---|
| 693 | MPFROMSHORT(((sSelect) ? sSelect - 1 : 0)),
|
---|
| 694 | MPFROMSHORT(TRUE));
|
---|
| 695 | }
|
---|
[2] | 696 | }
|
---|
[551] | 697 | else {
|
---|
| 698 | DosFindClose(hdir);
|
---|
| 699 | sprintf(s,
|
---|
| 700 | "%04u/%02u/%02u %02u:%02u:%02u",
|
---|
| 701 | 1980 + fs.fdateLastWrite.year,
|
---|
| 702 | fs.fdateLastWrite.month,
|
---|
| 703 | fs.fdateLastWrite.day,
|
---|
| 704 | fs.ftimeLastWrite.hours,
|
---|
| 705 | fs.ftimeLastWrite.minutes, fs.ftimeLastWrite.twosecs * 2);
|
---|
| 706 | WinSetDlgItemText(hwnd, FLE_LASTWRITE, s);
|
---|
| 707 | if (fs.fdateCreation.year &&
|
---|
| 708 | fs.fdateCreation.month && fs.fdateCreation.day) {
|
---|
| 709 | sprintf(s,
|
---|
| 710 | "%04u/%02u/%02u %02u:%02u:%02u",
|
---|
| 711 | 1980 + fs.fdateCreation.year,
|
---|
| 712 | fs.fdateCreation.month,
|
---|
| 713 | fs.fdateCreation.day,
|
---|
| 714 | fs.ftimeCreation.hours,
|
---|
| 715 | fs.ftimeCreation.minutes, fs.ftimeCreation.twosecs * 2);
|
---|
| 716 | WinSetDlgItemText(hwnd, FLE_CREATE, s);
|
---|
| 717 | }
|
---|
| 718 | if (fs.fdateLastAccess.year &&
|
---|
| 719 | fs.fdateLastAccess.month && fs.fdateLastAccess.day) {
|
---|
| 720 | sprintf(s,
|
---|
| 721 | "%04u/%02u/%02u %02u:%02u:%02u",
|
---|
| 722 | 1980 + fs.fdateLastAccess.year,
|
---|
| 723 | fs.fdateLastAccess.month,
|
---|
| 724 | fs.fdateLastAccess.day,
|
---|
| 725 | fs.ftimeLastAccess.hours,
|
---|
| 726 | fs.ftimeLastAccess.minutes, fs.ftimeLastAccess.twosecs * 2);
|
---|
| 727 | WinSetDlgItemText(hwnd, FLE_LASTACCESS, s);
|
---|
| 728 | }
|
---|
[897] | 729 | CommaFmtULL(szCmmaFmtFileSize,
|
---|
| 730 | sizeof(szCmmaFmtFileSize), fs.cbFile, ' ');
|
---|
| 731 | CommaFmtULL(szCmmaFmtEASize,
|
---|
| 732 | sizeof(szCmmaFmtEASize), CBLIST_TO_EASIZE(fs.cbList), ' ');
|
---|
| 733 | CommaFmtULL(szCmmaFmtFileEASize,
|
---|
| 734 | sizeof(szCmmaFmtFileEASize),
|
---|
| 735 | fs.cbFile + CBLIST_TO_EASIZE(fs.cbList),
|
---|
| 736 | ' ');
|
---|
| 737 | CommaFmtULL(szCmmaFmtFileEASizeK,
|
---|
| 738 | sizeof(szCmmaFmtFileEASizeK),
|
---|
| 739 | fs.cbFile + CBLIST_TO_EASIZE(fs.cbList),
|
---|
| 740 | 'K');
|
---|
[551] | 741 | sprintf(s,
|
---|
| 742 | GetPString(IDS_SIZEINCLEASTEXT),
|
---|
[897] | 743 | szCmmaFmtFileSize,
|
---|
| 744 | szCmmaFmtEASize,
|
---|
| 745 | szCmmaFmtFileEASize,
|
---|
| 746 | szCmmaFmtFileEASizeK);
|
---|
[551] | 747 | WinSetDlgItemText(hwnd, FLE_SIZES, s);
|
---|
[897] | 748 | CommaFmtULL(szCmmaFmtFileSize,
|
---|
| 749 | sizeof(szCmmaFmtFileSize), fs.cbFileAlloc - fs.cbFile, ' ');
|
---|
| 750 | sprintf(s, "%s", szCmmaFmtFileSize);
|
---|
[551] | 751 | WinSetDlgItemText(hwnd, FLE_SLACK, s);
|
---|
| 752 | WinCheckButton(hwnd,
|
---|
| 753 | FLE_READONLY, ((fs.attrFile & FILE_READONLY) != 0));
|
---|
| 754 | WinCheckButton(hwnd,
|
---|
| 755 | FLE_ARCHIVED, ((fs.attrFile & FILE_ARCHIVED) != 0));
|
---|
| 756 | WinCheckButton(hwnd,
|
---|
| 757 | FLE_DIRECTORY, ((fs.attrFile & FILE_DIRECTORY) != 0));
|
---|
| 758 | WinCheckButton(hwnd, FLE_HIDDEN, ((fs.attrFile & FILE_HIDDEN) != 0));
|
---|
| 759 | WinCheckButton(hwnd, FLE_SYSTEM, ((fs.attrFile & FILE_SYSTEM) != 0));
|
---|
| 760 | DosError(FERR_DISABLEHARDERR);
|
---|
[575] | 761 | if (!DosQueryAppType(pfs->szFileName, &apptype)) {
|
---|
[551] | 762 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2FS), TRUE);
|
---|
| 763 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2WIN), TRUE);
|
---|
| 764 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2PM), TRUE);
|
---|
| 765 | WinEnableWindow(WinWindowFromID(hwnd, FLE_BOUND), TRUE);
|
---|
| 766 | WinEnableWindow(WinWindowFromID(hwnd, FLE_32BIT), TRUE);
|
---|
| 767 | WinEnableWindow(WinWindowFromID(hwnd, FLE_DOS), TRUE);
|
---|
| 768 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINPROT), TRUE);
|
---|
| 769 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINREAL), TRUE);
|
---|
| 770 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINENH), TRUE);
|
---|
| 771 | WinEnableWindow(WinWindowFromID(hwnd, FLE_DLL), TRUE);
|
---|
| 772 | WinEnableWindow(WinWindowFromID(hwnd, FLE_PHYSDRV), TRUE);
|
---|
| 773 | WinEnableWindow(WinWindowFromID(hwnd, FLE_VIRTDRV), TRUE);
|
---|
| 774 | WinEnableWindow(WinWindowFromID(hwnd, FLE_PROTDLL), TRUE);
|
---|
| 775 | WinCheckButton(hwnd, FLE_OS2FS,
|
---|
| 776 | ((apptype & FAPPTYP_NOTWINDOWCOMPAT) &&
|
---|
| 777 | !(apptype & FAPPTYP_WINDOWCOMPAT)));
|
---|
| 778 | WinCheckButton(hwnd, FLE_OS2WIN,
|
---|
| 779 | ((apptype & FAPPTYP_WINDOWCOMPAT) &&
|
---|
| 780 | !(apptype & FAPPTYP_NOTWINDOWCOMPAT)));
|
---|
| 781 | WinCheckButton(hwnd, FLE_OS2PM,
|
---|
| 782 | ((apptype & FAPPTYP_WINDOWAPI) ==
|
---|
| 783 | FAPPTYP_WINDOWAPI));
|
---|
| 784 | WinCheckButton(hwnd, FLE_BOUND, ((apptype & FAPPTYP_BOUND) != 0));
|
---|
| 785 | WinCheckButton(hwnd, FLE_DLL, ((apptype & FAPPTYP_DLL) != 0));
|
---|
| 786 | WinCheckButton(hwnd, FLE_DOS, ((apptype & FAPPTYP_DOS) != 0));
|
---|
| 787 | WinCheckButton(hwnd, FLE_PHYSDRV,
|
---|
| 788 | ((apptype & FAPPTYP_PHYSDRV) != 0));
|
---|
| 789 | WinCheckButton(hwnd, FLE_VIRTDRV,
|
---|
| 790 | ((apptype & FAPPTYP_VIRTDRV) != 0));
|
---|
| 791 | WinCheckButton(hwnd, FLE_PROTDLL,
|
---|
| 792 | ((apptype & FAPPTYP_PROTDLL) != 0));
|
---|
| 793 | WinCheckButton(hwnd, FLE_WINREAL,
|
---|
| 794 | ((apptype & FAPPTYP_WINDOWSREAL) != 0));
|
---|
| 795 | WinCheckButton(hwnd, FLE_WINPROT,
|
---|
| 796 | ((apptype & FAPPTYP_WINDOWSPROT) != 0));
|
---|
| 797 | WinCheckButton(hwnd, FLE_32BIT, ((apptype & FAPPTYP_32BIT) != 0));
|
---|
| 798 | WinCheckButton(hwnd, FLE_WINENH, ((apptype & 0x1000) != 0));
|
---|
| 799 | }
|
---|
| 800 | else {
|
---|
| 801 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2FS), FALSE);
|
---|
| 802 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2WIN), FALSE);
|
---|
| 803 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2PM), FALSE);
|
---|
| 804 | WinEnableWindow(WinWindowFromID(hwnd, FLE_BOUND), FALSE);
|
---|
| 805 | WinEnableWindow(WinWindowFromID(hwnd, FLE_32BIT), FALSE);
|
---|
| 806 | WinEnableWindow(WinWindowFromID(hwnd, FLE_DOS), FALSE);
|
---|
| 807 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINPROT), FALSE);
|
---|
| 808 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINREAL), FALSE);
|
---|
| 809 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINENH), FALSE);
|
---|
| 810 | WinEnableWindow(WinWindowFromID(hwnd, FLE_DLL), FALSE);
|
---|
| 811 | WinEnableWindow(WinWindowFromID(hwnd, FLE_PHYSDRV), FALSE);
|
---|
| 812 | WinEnableWindow(WinWindowFromID(hwnd, FLE_VIRTDRV), FALSE);
|
---|
| 813 | WinEnableWindow(WinWindowFromID(hwnd, FLE_PROTDLL), FALSE);
|
---|
| 814 | }
|
---|
[575] | 815 | hptr = WinLoadFileIcon(pfs->szFileName, FALSE);
|
---|
[551] | 816 | WinShowWindow(WinWindowFromID(hwnd, FLE_ICON), FALSE);
|
---|
| 817 | if (hptr) {
|
---|
| 818 | WinSendDlgItemMsg(hwnd,
|
---|
| 819 | FLE_ICON, SM_SETHANDLE, MPFROMLONG(hptr), MPVOID);
|
---|
| 820 | WinShowWindow(WinWindowFromID(hwnd, FLE_ICON), TRUE);
|
---|
| 821 | }
|
---|
| 822 | WinShowWindow(WinWindowFromID(hwnd, FLE_EAS), fs.cbList > 4);
|
---|
| 823 | if (!(fs.attrFile & FILE_DIRECTORY)) {
|
---|
| 824 | WinEnableWindow(WinWindowFromID(hwnd, FLE_READABLE), TRUE);
|
---|
| 825 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WRITEABLE), TRUE);
|
---|
| 826 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OPEN), TRUE);
|
---|
| 827 | WinEnableWindow(WinWindowFromID(hwnd, FLE_ISARCHIVE), TRUE);
|
---|
| 828 | WinEnableWindow(WinWindowFromID(hwnd, FLE_BINARY), TRUE);
|
---|
[805] | 829 | fp = _fsopen(pfs->szFileName, "rb", SH_DENYNO);
|
---|
[551] | 830 | if (fp) {
|
---|
[850] | 831 | char buff[4096]; // 06 Oct 07 SHL protect against NTFS defect
|
---|
[551] | 832 | ULONG len;
|
---|
| 833 | APIRET rc;
|
---|
[2] | 834 |
|
---|
[551] | 835 | len = 512;
|
---|
| 836 | rc = DosRead(fileno(fp), buff, len, &len);
|
---|
| 837 | fclose(fp);
|
---|
| 838 | WinCheckButton(hwnd,
|
---|
| 839 | FLE_BINARY,
|
---|
| 840 | ((len && rc) ? IsBinary(buff, len) : 2));
|
---|
| 841 | WinCheckButton(hwnd, FLE_READABLE, TRUE);
|
---|
[575] | 842 | info = find_type(pfs->szFileName, NULL);
|
---|
[551] | 843 | if (info) {
|
---|
| 844 | WinCheckButton(hwnd, FLE_ISARCHIVE, 1);
|
---|
| 845 | if (info->id)
|
---|
| 846 | WinSetDlgItemText(hwnd, FLE_ARCNAME, info->id);
|
---|
| 847 | }
|
---|
| 848 | }
|
---|
| 849 | else {
|
---|
| 850 | WinCheckButton(hwnd, FLE_ISARCHIVE, 2);
|
---|
| 851 | WinCheckButton(hwnd, FLE_BINARY, 2);
|
---|
| 852 | }
|
---|
[575] | 853 | fp = _fsopen(pfs->szFileName, "ab", SH_DENYNO);
|
---|
[551] | 854 | if (fp) {
|
---|
| 855 | WinCheckButton(hwnd, FLE_WRITEABLE, TRUE);
|
---|
| 856 | fclose(fp);
|
---|
| 857 | }
|
---|
[575] | 858 | fp = _fsopen(pfs->szFileName, "rb", SH_DENYRW);
|
---|
[551] | 859 | if (!fp)
|
---|
| 860 | WinCheckButton(hwnd, FLE_OPEN, TRUE);
|
---|
| 861 | else
|
---|
| 862 | fclose(fp);
|
---|
| 863 | }
|
---|
| 864 | else {
|
---|
| 865 | WinEnableWindow(WinWindowFromID(hwnd, FLE_READABLE), FALSE);
|
---|
| 866 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WRITEABLE), FALSE);
|
---|
| 867 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OPEN), FALSE);
|
---|
| 868 | WinEnableWindow(WinWindowFromID(hwnd, FLE_ISARCHIVE), FALSE);
|
---|
| 869 | WinEnableWindow(WinWindowFromID(hwnd, FLE_BINARY), FALSE);
|
---|
| 870 | }
|
---|
[2] | 871 | }
|
---|
[551] | 872 | }
|
---|
| 873 | return 0;
|
---|
[2] | 874 |
|
---|
[551] | 875 | case WM_COMMAND:
|
---|
| 876 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 877 | case DID_OK:
|
---|
[575] | 878 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 879 | WinDismissDlg(hwnd, (pfs && pfs->madechanges) ? 2 : 1);
|
---|
[551] | 880 | break;
|
---|
| 881 | case IDM_HELP:
|
---|
| 882 | if (hwndHelp)
|
---|
| 883 | WinSendMsg(hwndHelp,
|
---|
| 884 | HM_DISPLAY_HELP,
|
---|
| 885 | MPFROM2SHORT(HELP_INFO, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
| 886 | break;
|
---|
| 887 | case FLE_SETTINGS:
|
---|
[575] | 888 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 889 | if (pfs && *pfs->szFileName)
|
---|
| 890 | OpenObject(pfs->szFileName, Settings, hwnd);
|
---|
[551] | 891 | break;
|
---|
| 892 | case FLE_EAS:
|
---|
[575] | 893 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 894 | if (pfs && *pfs->szFileName) {
|
---|
[2] | 895 |
|
---|
[551] | 896 | CHAR *list[2];
|
---|
[2] | 897 |
|
---|
[575] | 898 | list[0] = pfs->szFileName;
|
---|
[551] | 899 | list[1] = NULL;
|
---|
| 900 | WinDlgBox(HWND_DESKTOP,
|
---|
| 901 | hwnd, DisplayEAsProc, FM3ModHandle, EA_FRAME, (PVOID) list);
|
---|
[2] | 902 | }
|
---|
[551] | 903 | break;
|
---|
| 904 | case DID_CANCEL:
|
---|
[575] | 905 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 906 | WinDismissDlg(hwnd, (pfs && pfs->madechanges) ? 2 : 0);
|
---|
[551] | 907 | break;
|
---|
| 908 | }
|
---|
| 909 | return 0;
|
---|
[2] | 910 |
|
---|
[551] | 911 | case WM_DESTROY:
|
---|
[575] | 912 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
[1009] | 913 | xfree(pfs, pszSrcFile, __LINE__);
|
---|
[551] | 914 | break;
|
---|
[2] | 915 | }
|
---|
[551] | 916 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
[2] | 917 | }
|
---|
| 918 |
|
---|
[551] | 919 | MRESULT EXPENTRY SetDrvProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
[336] | 920 | {
|
---|
[551] | 921 | switch (msg) {
|
---|
| 922 | case WM_INITDLG:
|
---|
[1009] | 923 | if (!mp2 || !isalpha(*(CHAR *)mp2))
|
---|
[551] | 924 | WinDismissDlg(hwnd, 0);
|
---|
| 925 | else {
|
---|
[2] | 926 |
|
---|
[551] | 927 | CHAR s[80];
|
---|
[2] | 928 |
|
---|
[1009] | 929 | WinSetWindowULong(hwnd, QWL_USER, (toupper(*(CHAR *)mp2) - 'A'));
|
---|
| 930 | sprintf(s, GetPString(IDS_DRIVEFLAGSTITLETEXT), toupper(*(CHAR *)mp2));
|
---|
[551] | 931 | WinSetWindowText(hwnd, s);
|
---|
[2] | 932 | /*
|
---|
[575] | 933 | WinEnableWindow(WinWindowFromID(hwnd,DVS_REMOVABLE),FALSE);
|
---|
| 934 | WinEnableWindow(WinWindowFromID(hwnd,DVS_NOTWRITEABLE),FALSE);
|
---|
| 935 | WinEnableWindow(WinWindowFromID(hwnd,DVS_IGNORE),FALSE);
|
---|
| 936 | WinEnableWindow(WinWindowFromID(hwnd,DVS_CDROM),FALSE);
|
---|
| 937 | WinEnableWindow(WinWindowFromID(hwnd,DVS_NOLONGNAMES),FALSE);
|
---|
| 938 | WinEnableWindow(WinWindowFromID(hwnd,DVS_REMOTE),FALSE);
|
---|
| 939 | WinEnableWindow(WinWindowFromID(hwnd,DVS_VIRTUAL),FALSE);
|
---|
| 940 | WinEnableWindow(WinWindowFromID(hwnd,DVS_RAMDISK),FALSE);
|
---|
| 941 | WinEnableWindow(WinWindowFromID(hwnd,DVS_BOOT),FALSE);
|
---|
| 942 | WinEnableWindow(WinWindowFromID(hwnd,DVS_INVALID),FALSE);
|
---|
| 943 | WinEnableWindow(WinWindowFromID(hwnd,DVS_ZIPSTREAM),FALSE);
|
---|
| 944 | WinEnableWindow(WinWindowFromID(hwnd,DVS_NOSTATS),FALSE);
|
---|
[2] | 945 | */
|
---|
[551] | 946 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
| 947 | }
|
---|
| 948 | break;
|
---|
[2] | 949 |
|
---|
[551] | 950 | case UM_UNDO:
|
---|
| 951 | {
|
---|
| 952 | ULONG drive = WinQueryWindowULong(hwnd, QWL_USER);
|
---|
[2] | 953 |
|
---|
[551] | 954 | WinCheckButton(hwnd, DVS_REMOVABLE,
|
---|
| 955 | ((driveflags[drive] & DRIVE_REMOVABLE) != 0));
|
---|
| 956 | WinCheckButton(hwnd, DVS_NOTWRITEABLE,
|
---|
| 957 | ((driveflags[drive] & DRIVE_NOTWRITEABLE) != 0));
|
---|
| 958 | WinCheckButton(hwnd, DVS_IGNORE,
|
---|
| 959 | ((driveflags[drive] & DRIVE_IGNORE) != 0));
|
---|
| 960 | WinCheckButton(hwnd, DVS_CDROM,
|
---|
| 961 | ((driveflags[drive] & DRIVE_CDROM) != 0));
|
---|
| 962 | WinCheckButton(hwnd, DVS_NOLONGNAMES,
|
---|
| 963 | ((driveflags[drive] & DRIVE_NOLONGNAMES) != 0));
|
---|
| 964 | WinCheckButton(hwnd, DVS_REMOTE,
|
---|
| 965 | ((driveflags[drive] & DRIVE_REMOTE) != 0));
|
---|
[552] | 966 | WinCheckButton(hwnd,DVS_VIRTUAL,
|
---|
[575] | 967 | ((driveflags[drive] & DRIVE_VIRTUAL) != 0));
|
---|
[552] | 968 | WinCheckButton(hwnd,DVS_RAMDISK,
|
---|
[575] | 969 | ((driveflags[drive] & DRIVE_RAMDISK) != 0));
|
---|
[552] | 970 | WinCheckButton(hwnd, DVS_BOOT,
|
---|
[575] | 971 | ((driveflags[drive] & DRIVE_BOOT) != 0));
|
---|
[551] | 972 | WinCheckButton(hwnd, DVS_INVALID,
|
---|
| 973 | ((driveflags[drive] & DRIVE_INVALID) != 0));
|
---|
| 974 | WinCheckButton(hwnd, DVS_NOPRESCAN,
|
---|
| 975 | ((driveflags[drive] & DRIVE_NOPRESCAN) != 0));
|
---|
| 976 | WinCheckButton(hwnd, DVS_ZIPSTREAM,
|
---|
| 977 | ((driveflags[drive] & DRIVE_ZIPSTREAM) != 0));
|
---|
| 978 | WinCheckButton(hwnd, DVS_NOLOADICONS,
|
---|
| 979 | ((driveflags[drive] & DRIVE_NOLOADICONS) != 0));
|
---|
| 980 | WinCheckButton(hwnd, DVS_NOLOADSUBJS,
|
---|
| 981 | ((driveflags[drive] & DRIVE_NOLOADSUBJS) != 0));
|
---|
| 982 | WinCheckButton(hwnd, DVS_NOLOADLONGS,
|
---|
| 983 | ((driveflags[drive] & DRIVE_NOLOADLONGS) != 0));
|
---|
| 984 | WinCheckButton(hwnd, DVS_SLOW, ((driveflags[drive] & DRIVE_SLOW) != 0));
|
---|
| 985 | WinCheckButton(hwnd, DVS_INCLUDEFILES,
|
---|
| 986 | ((driveflags[drive] & DRIVE_INCLUDEFILES) != 0));
|
---|
[552] | 987 | WinCheckButton(hwnd,DVS_NOSTATS,
|
---|
[1354] | 988 | ((driveflags[drive] & DRIVE_NOSTATS) != 0));
|
---|
| 989 | WinCheckButton(hwnd,DVS_WRITEVERIFYOFF,
|
---|
| 990 | ((driveflags[drive] & DRIVE_WRITEVERIFYOFF) != 0));
|
---|
| 991 | WinCheckButton(hwnd,DVS_RSCANNED,
|
---|
| 992 | ((driveflags[drive] & DRIVE_RSCANNED) != 0));
|
---|
[551] | 993 | }
|
---|
| 994 | return 0;
|
---|
[2] | 995 |
|
---|
[551] | 996 | case WM_CONTROL:
|
---|
| 997 | return 0;
|
---|
[2] | 998 |
|
---|
[551] | 999 | case WM_COMMAND:
|
---|
| 1000 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 1001 | case DID_OK:
|
---|
| 1002 | {
|
---|
| 1003 | ULONG drive = WinQueryWindowULong(hwnd, QWL_USER);
|
---|
[2] | 1004 |
|
---|
[551] | 1005 | if (WinQueryButtonCheckstate(hwnd, DVS_NOPRESCAN))
|
---|
| 1006 | driveflags[drive] |= DRIVE_NOPRESCAN;
|
---|
| 1007 | else
|
---|
| 1008 | driveflags[drive] &= (~DRIVE_NOPRESCAN);
|
---|
| 1009 | if (WinQueryButtonCheckstate(hwnd, DVS_NOLOADICONS))
|
---|
| 1010 | driveflags[drive] |= DRIVE_NOLOADICONS;
|
---|
| 1011 | else
|
---|
| 1012 | driveflags[drive] &= (~DRIVE_NOLOADICONS);
|
---|
| 1013 | if (WinQueryButtonCheckstate(hwnd, DVS_NOLOADSUBJS))
|
---|
| 1014 | driveflags[drive] |= DRIVE_NOLOADSUBJS;
|
---|
| 1015 | else
|
---|
| 1016 | driveflags[drive] &= (~DRIVE_NOLOADSUBJS);
|
---|
| 1017 | if (WinQueryButtonCheckstate(hwnd, DVS_NOLOADLONGS))
|
---|
| 1018 | driveflags[drive] |= DRIVE_NOLOADLONGS;
|
---|
| 1019 | else
|
---|
| 1020 | driveflags[drive] &= (~DRIVE_NOLOADLONGS);
|
---|
| 1021 | if (WinQueryButtonCheckstate(hwnd, DVS_SLOW))
|
---|
| 1022 | driveflags[drive] |= DRIVE_SLOW;
|
---|
| 1023 | else
|
---|
| 1024 | driveflags[drive] &= (~DRIVE_SLOW);
|
---|
| 1025 | if (WinQueryButtonCheckstate(hwnd, DVS_INCLUDEFILES))
|
---|
| 1026 | driveflags[drive] |= DRIVE_INCLUDEFILES;
|
---|
| 1027 | else
|
---|
| 1028 | driveflags[drive] &= (~DRIVE_INCLUDEFILES);
|
---|
[575] | 1029 | if (WinQueryButtonCheckstate(hwnd,DVS_NOSTATS))
|
---|
| 1030 | driveflags[drive] |= DRIVE_NOSTATS;
|
---|
| 1031 | else
|
---|
[1354] | 1032 | driveflags[drive] &= (~DRIVE_NOSTATS);
|
---|
| 1033 | if (WinQueryButtonCheckstate(hwnd,DVS_WRITEVERIFYOFF))
|
---|
| 1034 | driveflags[drive] |= DRIVE_WRITEVERIFYOFF;
|
---|
| 1035 | else
|
---|
| 1036 | driveflags[drive] &= (~DRIVE_WRITEVERIFYOFF);
|
---|
| 1037 | if (WinQueryButtonCheckstate(hwnd,DVS_RSCANNED))
|
---|
| 1038 | driveflags[drive] |= DRIVE_RSCANNED;
|
---|
| 1039 | else
|
---|
| 1040 | driveflags[drive] &= (~DRIVE_RSCANNED);
|
---|
[551] | 1041 | {
|
---|
| 1042 | ULONG flags;
|
---|
[1354] | 1043 | CHAR FlagKey[80];
|
---|
[2] | 1044 |
|
---|
[1354] | 1045 | sprintf(FlagKey, "%c.DriveFlags", (CHAR) (drive + 'A'));
|
---|
[551] | 1046 | flags = driveflags[drive];
|
---|
| 1047 | flags &= (~(DRIVE_REMOVABLE | DRIVE_NOTWRITEABLE |
|
---|
| 1048 | DRIVE_IGNORE | DRIVE_CDROM |
|
---|
[1354] | 1049 | DRIVE_REMOTE | DRIVE_RSCANNED |
|
---|
[575] | 1050 | DRIVE_BOOT | DRIVE_INVALID | DRIVE_ZIPSTREAM |
|
---|
| 1051 | DRIVE_VIRTUAL | DRIVE_RAMDISK));
|
---|
[1354] | 1052 | PrfWriteProfileData(fmprof, appname, FlagKey, &flags, sizeof(ULONG));
|
---|
[551] | 1053 | }
|
---|
| 1054 | }
|
---|
| 1055 | WinDismissDlg(hwnd, 1);
|
---|
| 1056 | break;
|
---|
[2] | 1057 |
|
---|
[551] | 1058 | case DID_CANCEL:
|
---|
| 1059 | WinDismissDlg(hwnd, 0);
|
---|
| 1060 | break;
|
---|
[2] | 1061 |
|
---|
[551] | 1062 | case IDM_UNDO:
|
---|
| 1063 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
| 1064 | break;
|
---|
[2] | 1065 |
|
---|
[551] | 1066 | case IDM_HELP:
|
---|
| 1067 | if (hwndHelp)
|
---|
| 1068 | WinSendMsg(hwndHelp,
|
---|
| 1069 | HM_DISPLAY_HELP,
|
---|
| 1070 | MPFROM2SHORT(HELP_FLAGS, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
| 1071 | break;
|
---|
| 1072 | }
|
---|
| 1073 | return 0;
|
---|
[2] | 1074 | }
|
---|
[551] | 1075 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
[2] | 1076 | }
|
---|
[793] | 1077 |
|
---|
| 1078 | #pragma alloc_text(FMINFO,FileInfoProc,IconProc)
|
---|
| 1079 | #pragma alloc_text(FMINFO2,SetDrvProc,DrvInfoProc)
|
---|