Changeset 71 for trunk/src/helpers/winh.c
- Timestamp:
- May 22, 2001, 7:18:41 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/winh.c
r69 r71 1492 1492 1493 1493 /* 1494 *@@ winhLboxFindItemFromHandle: 1495 * finds the list box item with the specified 1496 * handle. 1497 * 1498 * Of course this only makes sense if each item 1499 * has a unique handle indeed. 1500 * 1501 * Returns the index of the item found or -1. 1502 * 1503 *@@added V0.9.12 (2001-05-18) [umoeller] 1504 */ 1505 1506 ULONG winhLboxFindItemFromHandle(HWND hwndListBox, 1507 ULONG ulHandle) 1508 { 1509 LONG cItems = WinQueryLboxCount(hwndListBox); 1510 if (cItems) 1511 { 1512 ULONG ul; 1513 for (ul = 0; 1514 ul < cItems; 1515 ul++) 1516 { 1517 if (ulHandle == winhQueryLboxItemHandle(hwndListBox, 1518 ul)) 1519 return (ul); 1520 } 1521 } 1522 1523 return (-1); 1524 } 1525 1526 /* 1494 1527 *@@category: Helpers\PM helpers\Scroll bar helpers 1495 1528 */ … … 3566 3599 * 3567 3600 *@@added V0.9.3 (2000-04-29) [umoeller] 3601 *@@changed V0.9.12 (2001-05-21) [umoeller]: this failed if INI data had root dir, fixed 3568 3602 */ 3569 3603 … … 3580 3614 { 3581 3615 FILEDLG fd; 3616 FILESTATUS3 fs3; 3617 3582 3618 memset(&fd, 0, sizeof(FILEDLG)); 3583 3619 fd.cbSize = sizeof(FILEDLG); … … 3589 3625 fd.fl |= FDS_OPEN_DIALOG; 3590 3626 3591 // default: copy pszFile 3592 strcpy(fd.szFullFile, pszFile); 3593 3594 if ( (hini) && (flFlags & WINH_FOD_INILOADDIR) ) 3595 { 3596 // overwrite with initial directory for FOD from OS2.INI 3597 if (PrfQueryProfileString(hini, 3598 (PSZ)pcszApplication, 3599 (PSZ)pcszKey, 3600 "", // default string V0.9.9 (2001-02-10) [umoeller] 3601 fd.szFullFile, 3602 sizeof(fd.szFullFile)-10) 3603 >= 2) 3604 { 3605 // found: append "\*" 3606 strcat(fd.szFullFile, "\\"); 3607 strcat(fd.szFullFile, pszFile); 3608 } 3609 } 3627 if ( (hini) 3628 && (flFlags & WINH_FOD_INILOADDIR) 3629 && (PrfQueryProfileString(hini, 3630 (PSZ)pcszApplication, 3631 (PSZ)pcszKey, 3632 "", // default string V0.9.9 (2001-02-10) [umoeller] 3633 fd.szFullFile, 3634 sizeof(fd.szFullFile)-10) 3635 > 2) 3636 // added these checks V0.9.12 (2001-05-21) [umoeller] 3637 && (!DosQueryPathInfo(fd.szFullFile, 3638 FIL_STANDARD, 3639 &fs3, 3640 sizeof(fs3))) 3641 && (fs3.attrFile & FILE_DIRECTORY) 3642 ) 3643 { 3644 // found: append "\*" 3645 strcat(fd.szFullFile, "\\"); 3646 strcat(fd.szFullFile, pszFile); 3647 } 3648 else 3649 // default: copy pszFile 3650 strcpy(fd.szFullFile, pszFile); 3651 // fixed V0.9.12 (2001-05-21) [umoeller] 3610 3652 3611 3653 if ( WinFileDlg(HWND_DESKTOP, // parent
Note:
See TracChangeset
for help on using the changeset viewer.