Changeset 1326 for trunk/dll/mainwnd.c
- Timestamp:
- Dec 9, 2008, 3:18:36 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mainwnd.c
r1321 r1326 2913 2913 */ 2914 2914 2915 #define STATE_NAME_MAX_BYTES 2562916 2917 2915 INT SaveDirCnrState(HWND hwndClient, PSZ pszStateName) 2918 2916 { … … 2974 2972 sprintf(szKey, "%sDirCnrSort.%lu", szPrefix, numsaves); 2975 2973 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->sortFlags, 2976 size of(INT));2974 sizeInt); 2977 2975 sprintf(szKey, "%sDirCnrFilter.%lu", szPrefix, numsaves); 2978 2976 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->mask, … … 3051 3049 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(SWP)); 3052 3050 sprintf(szKey, "%sDirCnrSort.%lu", szPrefix, ulTemp); 3053 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(INT));3051 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeInt); 3054 3052 sprintf(szKey, "%sDirCnrFilter.%lu", szPrefix, ulTemp); 3055 3053 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(MASK)); 3056 3054 sprintf(szKey, "%sDirCnrView.%lu", szPrefix, ulTemp); 3057 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(ULONG));3055 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeUlong); 3058 3056 sprintf(szKey, "%sDirCnr.%lu.DetailsLongname", szPrefix, ulTemp); 3059 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3057 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3060 3058 sprintf(szKey, "%sDirCnr.%lu.DetailsSubject", szPrefix, ulTemp); 3061 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3059 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3062 3060 sprintf(szKey, "%sDirCnr.%lu.DetailsSize", szPrefix, ulTemp); 3063 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3061 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3064 3062 sprintf(szKey, "%sDirCnr.%lu.DetailsEA", szPrefix, ulTemp); 3065 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3063 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3066 3064 sprintf(szKey, "%sDirCnr.%lu.DetailsAttr", szPrefix, ulTemp); 3067 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3065 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3068 3066 sprintf(szKey, "%sDirCnr.%lu.DetailsIcon", szPrefix, ulTemp); 3069 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3067 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3070 3068 sprintf(szKey, "%sDirCnr.%lu.DetailsLWDate", szPrefix, ulTemp); 3071 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3069 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3072 3070 sprintf(szKey, "%sDirCnr.%lu.DetailsLWTime", szPrefix, ulTemp); 3073 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3071 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3074 3072 sprintf(szKey, "%sDirCnr.%lu.DetailsLADate", szPrefix, ulTemp); 3075 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3073 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3076 3074 sprintf(szKey, "%sDirCnr.%lu.DetailsLATime", szPrefix, ulTemp); 3077 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3075 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3078 3076 sprintf(szKey, "%sDirCnr.%lu.DetailsCRDate", szPrefix, ulTemp); 3079 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3077 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3080 3078 sprintf(szKey, "%sDirCnr.%lu.DetailsCRTime", szPrefix, ulTemp); 3081 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, size of(BOOL));3079 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool); 3082 3080 sprintf(szKey, "%sDirCnrDir.%lu", szPrefix, ulTemp); 3083 3081 PrfWriteProfileString(fmprof, FM3Str, szKey, NULL); … … 3087 3085 sprintf(szKey, "%sNumDirsLastTime", szPrefix); 3088 3086 if (numsaves) { 3089 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & numsaves, size of(ULONG));3087 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & numsaves, sizeUlong); 3090 3088 WinQueryWindowPos(WinQueryWindow(hwndClient, QW_PARENT), &swp); 3091 3089 sprintf(szKey, "%sMySizeLastTime", szPrefix); … … 3097 3095 } 3098 3096 else if (fIsShutDownState) { 3099 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & numsaves, size of(ULONG));3097 PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & numsaves, sizeUlong); 3100 3098 } 3101 3099 … … 3187 3185 PostMsg(hwndToolback, UM_SETUP2, MPVOID, MPVOID); 3188 3186 } 3189 DosWaitEventSem(DriveScanStart, 20000);3190 3187 size = (ULONG)0; 3191 3188 sprintf(szKey, "%sTargetDir", szPrefix); … … 3201 3198 FM3Str, 3202 3199 szKey, 3203 (PVOID) & 3200 (PVOID) &swpO, 3204 3201 &size) || 3205 3202 size != sizeof(SWP) || !swp.cx || !swp.cy) … … 3217 3214 size = sizeof(SWP); 3218 3215 sprintf(szKey, "%sLastTreePos", szPrefix); 3219 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) & 3216 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) &swp, &size)) { 3220 3217 if (fDeleteState) 3221 3218 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); … … 3246 3243 } 3247 3244 } 3248 size = sizeof(ULONG);3249 3245 sprintf(szKey, "%sNumDirsLastTime", szPrefix); 3250 3246 if (PrfQueryProfileData(fmprof, 3251 FM3Str, szKey, (PVOID) & numsaves, &size)) {3247 FM3Str, szKey, (PVOID) &numsaves, &sizeUlong)) { 3252 3248 if (fDeleteState) 3253 3249 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); … … 3271 3267 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3272 3268 localdcd.ds.detailslongname = dsDirCnrDefault.detailslongname; // Set default 3273 size = sizeof(BOOL);3274 3269 sprintf(szKey, "%sDirCnr.%lu.DetailsLongname", szPrefix, x); 3275 3270 if (PrfQueryProfileData(fmprof, 3276 3271 FM3Str, 3277 3272 szKey, 3278 (PVOID)&localdcd.ds.detailslongname, 3279 &size) && 3280 size == sizeof(BOOL)) 3273 (PVOID) &localdcd.ds.detailslongname, 3274 &sizeBool)) 3281 3275 { 3282 3276 if (fDeleteState) … … 3284 3278 } 3285 3279 localdcd.ds.detailssubject = dsDirCnrDefault.detailssubject; // Set default 3286 size = sizeof(BOOL);3287 3280 sprintf(szKey, "%sDirCnr.%lu.DetailsSubject", szPrefix, x); 3288 3281 if (PrfQueryProfileData(fmprof, 3289 3282 FM3Str, 3290 3283 szKey, 3291 (PVOID)&localdcd.ds.detailssubject, 3292 &size) && 3293 size == sizeof(BOOL)) 3284 (PVOID) &localdcd.ds.detailssubject, 3285 &sizeBool)) 3294 3286 { 3295 3287 if (fDeleteState) … … 3297 3289 } 3298 3290 localdcd.ds.detailsea = dsDirCnrDefault.detailsea; // Set default 3299 size = sizeof(BOOL);3300 3291 sprintf(szKey, "%sDirCnr.%lu.DetailsEA", szPrefix, x); 3301 3292 if (PrfQueryProfileData(fmprof, 3302 3293 FM3Str, 3303 3294 szKey, 3304 (PVOID) & localdcd.ds.detailsea, 3305 &size) && 3306 size == sizeof(BOOL)) 3295 (PVOID) &localdcd.ds.detailsea, 3296 &sizeBool)) 3307 3297 { 3308 3298 if (fDeleteState) … … 3310 3300 } 3311 3301 localdcd.ds.detailssize = dsDirCnrDefault.detailssize; // Set default 3312 size = sizeof(BOOL);3313 3302 sprintf(szKey, "%sDirCnr.%lu.DetailsSize", szPrefix, x); 3314 3303 if (PrfQueryProfileData(fmprof, 3315 3304 FM3Str, 3316 3305 szKey, 3317 (PVOID) & localdcd.ds.detailssize, 3318 &size) && 3319 size == sizeof(BOOL)) 3306 (PVOID) &localdcd.ds.detailssize, 3307 &sizeBool)) 3320 3308 { 3321 3309 if (fDeleteState) … … 3323 3311 } 3324 3312 localdcd.ds.detailsicon = dsDirCnrDefault.detailsicon; // Set default 3325 size = sizeof(BOOL);3326 3313 sprintf(szKey, "%sDirCnr.%lu.DetailsIcon", szPrefix, x); 3327 3314 if (PrfQueryProfileData(fmprof, 3328 3315 FM3Str, 3329 3316 szKey, 3330 (PVOID) & localdcd.ds.detailsicon, 3331 &size) && 3332 size == sizeof(BOOL)) 3317 (PVOID) &localdcd.ds.detailsicon, 3318 &sizeBool)) 3333 3319 { 3334 3320 if (fDeleteState) … … 3336 3322 } 3337 3323 localdcd.ds.detailsattr = dsDirCnrDefault.detailsattr; // Set default 3338 size = sizeof(BOOL);3339 3324 sprintf(szKey, "%sDirCnr.%lu.DetailsAttr", szPrefix, x); 3340 3325 if (PrfQueryProfileData(fmprof, 3341 3326 FM3Str, 3342 3327 szKey, 3343 (PVOID)&localdcd.ds.detailsattr, 3344 &size) && 3345 size == sizeof(BOOL)) 3328 (PVOID) &localdcd.ds.detailsattr, 3329 &sizeBool)) 3346 3330 { 3347 3331 if (fDeleteState) … … 3349 3333 } 3350 3334 localdcd.ds.detailscrdate = dsDirCnrDefault.detailscrdate; // Set default 3351 size = sizeof(BOOL);3352 3335 sprintf(szKey, "%sDirCnr.%lu.DetailsCRDate", szPrefix, x); 3353 3336 if (PrfQueryProfileData(fmprof, 3354 3337 FM3Str, 3355 3338 szKey, 3356 (PVOID) & 3357 &size) && size == sizeof(BOOL))3339 (PVOID) &localdcd.ds.detailscrdate, 3340 &sizeBool)) 3358 3341 { 3359 3342 if (fDeleteState) … … 3361 3344 } 3362 3345 localdcd.ds.detailscrtime = dsDirCnrDefault.detailscrtime; // Set default 3363 size = sizeof(BOOL);3364 3346 sprintf(szKey, "%sDirCnr.%lu.DetailsCRTime", szPrefix, x); 3365 3347 if (PrfQueryProfileData(fmprof, 3366 3348 FM3Str, 3367 3349 szKey, 3368 (PVOID)&localdcd.ds.detailscrtime, 3369 &size) && 3370 size == sizeof(BOOL)) 3350 (PVOID) &localdcd.ds.detailscrtime, 3351 &sizeBool)) 3371 3352 { 3372 3353 if (fDeleteState) … … 3374 3355 } 3375 3356 localdcd.ds.detailslwdate = dsDirCnrDefault.detailslwdate; // Set default 3376 size = sizeof(BOOL);3377 3357 sprintf(szKey, "%sDirCnr.%lu.DetailsLWDate", szPrefix, x); 3378 3358 if (PrfQueryProfileData(fmprof, 3379 3359 FM3Str, 3380 3360 szKey, 3381 (PVOID) & localdcd.ds.detailslwdate, 3382 &size) && 3383 size == sizeof(BOOL)) 3361 (PVOID) &localdcd.ds.detailslwdate, 3362 &sizeBool)) 3384 3363 { 3385 3364 if (fDeleteState) … … 3387 3366 } 3388 3367 localdcd.ds.detailslwtime = dsDirCnrDefault.detailslwtime; // Set default 3389 size = sizeof(BOOL);3390 3368 sprintf(szKey, "%sDirCnr.%lu.DetailsLWTime", szPrefix, x); 3391 3369 if (PrfQueryProfileData(fmprof, 3392 3370 FM3Str, 3393 3371 szKey, 3394 (PVOID) & localdcd.ds.detailslwtime, 3395 &size) && 3396 size == sizeof(BOOL)) 3372 (PVOID) &localdcd.ds.detailslwtime, 3373 &sizeBool)) 3397 3374 { 3398 3375 if (fDeleteState) … … 3400 3377 } 3401 3378 localdcd.ds.detailsladate = dsDirCnrDefault.detailsladate; // Set default 3402 size = sizeof(BOOL);3403 3379 sprintf(szKey, "%sDirCnr.%lu.DetailsLADate", szPrefix, x); 3404 3380 if (PrfQueryProfileData(fmprof, 3405 3381 FM3Str, 3406 3382 szKey, 3407 (PVOID) & localdcd.ds.detailsladate, 3408 &size) && 3409 size == sizeof(BOOL)) 3383 (PVOID) &localdcd.ds.detailsladate, 3384 &sizeBool)) 3410 3385 { 3411 3386 if (fDeleteState) … … 3413 3388 } 3414 3389 localdcd.ds.detailslatime = dsDirCnrDefault.detailslatime; // Set default 3415 size = sizeof(BOOL);3416 3390 sprintf(szKey, "%sDirCnr.%lu.DetailsLATime", szPrefix, x); 3417 3391 if (PrfQueryProfileData(fmprof, 3418 3392 FM3Str, 3419 3393 szKey, 3420 (PVOID) & localdcd.ds.detailslatime, 3421 &size) && 3422 size == sizeof(BOOL)) 3394 (PVOID) &localdcd.ds.detailslatime, 3395 &sizeBool)) 3423 3396 { 3424 3397 if (fDeleteState) … … 3437 3410 NULL, 3438 3411 CCS_AUTOPOSITION | CCS_MINIICONS | 3439 CCS_MINIRECORDCORE | ulCnrType | 3440 WS_VISIBLE, 3412 CCS_MINIRECORDCORE | ulCnrType, //| WS_VISIBLE, 3441 3413 0, 3442 3414 0, … … 3464 3436 dcd->ds.detailslwdate = localdcd.ds.detailslwdate ; 3465 3437 dcd->ds.detailslwtime = localdcd.ds.detailslwtime ; 3466 size = sizeof(INT);3467 3438 sprintf(szKey, "%sDirCnrSort.%lu", szPrefix, x); 3468 3439 if (PrfQueryProfileData(fmprof, 3469 3440 FM3Str, 3470 3441 szKey, 3471 (PVOID) & 3472 &size ) && size == sizeof(INT)) {3442 (PVOID) &dcd->sortFlags, 3443 &sizeInt)) { 3473 3444 if (!dcd->sortFlags) 3474 3445 dcd->sortFlags = SORT_PATHNAME; … … 3481 3452 FM3Str, 3482 3453 szKey, 3483 (PVOID) & dcd->mask, &size) && size) {3454 (PVOID) &dcd->mask, &size)) { 3484 3455 if (*dcd->mask.szMask) 3485 3456 WinSendMsg(WinWindowFromID(hwndC, DIR_CNR), … … 3489 3460 if (fDeleteState) 3490 3461 PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L); 3491 size = sizeof(ULONG);3492 3462 sprintf(szKey, "%sDirCnrView.%lu", szPrefix, x); 3493 3463 if (!noview) { … … 3495 3465 FM3Str, 3496 3466 szKey, 3497 (PVOID) & 3498 &size ) && size == sizeof(ULONG)) {3467 (PVOID) &dcd->flWindowAttr, 3468 &sizeUlong)) { 3499 3469 3500 3470 CNRINFO cnri; … … 3545 3515 } // for 3546 3516 if (hwndPPSave) { 3547 3548 3517 SavePresParams(hwndPPSave, "DirCnr"); 3518 WinDestroyWindow(hwndPPSave); 3549 3519 } 3550 3520 }
Note:
See TracChangeset
for help on using the changeset viewer.