- Timestamp:
- Apr 24, 2001, 10:37:25 PM (24 years ago)
- Location:
- trunk/src/comdlg32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comdlg32/colordlg.c
r4514 r5583 870 870 if (!(lpp->lpcc->Flags & CC_SHOWHELP)) 871 871 ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE); 872 lpp->msetrgb = RegisterWindowMessageA(SETRGBSTRING );872 lpp->msetrgb = RegisterWindowMessageA(SETRGBSTRINGA); 873 873 874 874 #if 0 … … 1057 1057 1058 1058 case 0x40e: /* Help! */ /* The Beatles, 1965 ;-) */ 1059 i = RegisterWindowMessageA(HELPMSGSTRING );1059 i = RegisterWindowMessageA(HELPMSGSTRINGA); 1060 1060 #ifndef __WIN32OS2__ 1061 1061 if (lpp->lpcc16) … … 1081 1081 1082 1082 case IDOK : 1083 cokmsg = RegisterWindowMessageA(COLOROKSTRING );1083 cokmsg = RegisterWindowMessageA(COLOROKSTRINGA); 1084 1084 #ifndef __WIN32OS2__ 1085 1085 if (lpp->lpcc16) -
trunk/src/comdlg32/comdlgguid.cpp
r1548 r5583 1 /* $Id: comdlgguid.cpp,v 1. 1 1999-11-02 19:09:42sandervl Exp $ */1 /* $Id: comdlgguid.cpp,v 1.2 2001-04-24 20:37:24 sandervl Exp $ */ 2 2 3 3 /***************************************************************************** … … 25 25 #include <wine/obj_shellextinit.h> 26 26 #include <wine/obj_shellbrowser.h> 27 #include <wine/obj_serviceprovider.h> 27 28 #include <docobj.h> 28 29 -
trunk/src/comdlg32/filedlg.c
r5462 r5583 135 135 if (!hNet) hNet = LoadImageA(0, MAKEINTRESOURCEA(OIC_NETWORK), IMAGE_ICON, 16, 16, LR_SHARED); 136 136 #else 137 if (!hFolder) hFolder = LoadIconA(0, MAKEINTRESOURCEA(OIC_FOLDER)); 138 if (!hFolder2) hFolder2 = LoadIconA(0, MAKEINTRESOURCEA(OIC_FOLDER2)); 139 if (!hFloppy) hFloppy = LoadIconA(0, MAKEINTRESOURCEA(OIC_FLOPPY)); 140 if (!hHDisk) hHDisk = LoadIconA(0, MAKEINTRESOURCEA(OIC_HDISK)); 141 if (!hCDRom) hCDRom = LoadIconA(0, MAKEINTRESOURCEA(OIC_CDROM)); 142 if (!hNet) hNet = LoadIconA(0, MAKEINTRESOURCEA(OIC_NETWORK)); 137 HINSTANCE inst = GetModuleHandleA( "comdlg32.dll" ); 138 if (!inst) 139 { 140 ERR( "cannot get comdlg32.dll instance\n" ); 141 return FALSE; 142 } 143 hFolder = LoadImageA( inst, "FOLDER", IMAGE_ICON, 16, 16, LR_SHARED ); 144 hFolder2 = LoadImageA( inst, "FOLDER2", IMAGE_ICON, 16, 16, LR_SHARED ); 145 hFloppy = LoadImageA( inst, "FLOPPY", IMAGE_ICON, 16, 16, LR_SHARED ); 146 hHDisk = LoadImageA( inst, "HDISK", IMAGE_ICON, 16, 16, LR_SHARED ); 147 hCDRom = LoadImageA( inst, "CDROM", IMAGE_ICON, 16, 16, LR_SHARED ); 148 hNet = LoadImageA( inst, "NETWORK", IMAGE_ICON, 16, 16, LR_SHARED ); 143 149 #endif 144 150 if (hFolder == 0 || hFolder2 == 0 || hFloppy == 0 || … … 1318 1324 else 1319 1325 lfs->open = FALSE; 1320 lfs->lbselchstring = RegisterWindowMessageA(LBSELCHSTRING );1321 lfs->fileokstring = RegisterWindowMessageA(FILEOKSTRING );1326 lfs->lbselchstring = RegisterWindowMessageA(LBSELCHSTRINGA); 1327 lfs->fileokstring = RegisterWindowMessageA(FILEOKSTRINGA); 1322 1328 switch(type) 1323 1329 { … … 1677 1683 { 1678 1684 BOOL newlook = TRUE; /* FIXME: TWEAK_WineLook */ 1685 COMDLG32_SetCommDlgExtendedError(0); 1679 1686 1680 1687 #ifdef __WIN32OS2__ … … 1712 1719 { 1713 1720 BOOL newlook = TRUE; /* FIXME: TWEAK_WineLook */ 1721 COMDLG32_SetCommDlgExtendedError(0); 1714 1722 1715 1723 #ifdef __WIN32OS2__ … … 1747 1755 { 1748 1756 BOOL newlook = TRUE; /* FIXME: TWEAK_WineLook */ 1757 COMDLG32_SetCommDlgExtendedError(0); 1749 1758 1750 1759 #ifdef __WIN32OS2__ … … 1782 1791 { 1783 1792 BOOL newlook = TRUE; /* FIXME: TWEAK_WineLook */ 1793 COMDLG32_SetCommDlgExtendedError(0); 1784 1794 1785 1795 #ifdef __WIN32OS2__ -
trunk/src/comdlg32/filedlg95.c
r5141 r5583 45 45 #define MapHModuleSL(a) a 46 46 #define MapHModuleLS(a) a 47 #define snprintf wsnprintfA 47 48 #endif 48 49 … … 54 55 #include "winbase.h" 55 56 #include "ntddk.h" 56 #include "wine/winestring.h" 57 #include "ldt.h" 57 #include "winnls.h" 58 58 #include "heap.h" 59 59 #include "commdlg.h" … … 62 62 #include "debugtools.h" 63 63 #include "cderr.h" 64 #include "tweak.h"65 #include "winnls.h"66 64 #include "shellapi.h" 67 65 #include "shlguid.h" … … 75 73 (OFN_CREATEPROMPT | OFN_DONTADDTORECENT |\ 76 74 OFN_ENABLEINCLUDENOTIFY | OFN_ENABLESIZING | OFN_EXTENSIONDIFFERENT |\ 77 OFN_NODEREFERENCELINKS | OFN_NOREADONLYRETURN | 75 OFN_NODEREFERENCELINKS | OFN_NOREADONLYRETURN |\ 78 76 OFN_NOTESTFILECREATE | OFN_OVERWRITEPROMPT /*| OFN_USEMONIKERS*/) 79 77 … … 257 255 if (IsHooked(fodInfos)) 258 256 { 259 fodInfos->HookMsg.fileokstring = RegisterWindowMessageA(FILEOKSTRING );260 fodInfos->HookMsg.lbselchstring = RegisterWindowMessageA(LBSELCHSTRING );261 fodInfos->HookMsg.helpmsgstring = RegisterWindowMessageA(HELPMSGSTRING );262 fodInfos->HookMsg.sharevistring = RegisterWindowMessageA(SHAREVISTRING );257 fodInfos->HookMsg.fileokstring = RegisterWindowMessageA(FILEOKSTRINGA); 258 fodInfos->HookMsg.lbselchstring = RegisterWindowMessageA(LBSELCHSTRINGA); 259 fodInfos->HookMsg.helpmsgstring = RegisterWindowMessageA(HELPMSGSTRINGA); 260 fodInfos->HookMsg.sharevistring = RegisterWindowMessageA(SHAREVISTRINGA); 263 261 } 264 262 … … 368 366 if(arg) \ 369 367 { \ 368 DWORD _len = WideCharToMultiByte( CP_ACP, 0, arg, -1, NULL, 0, NULL, NULL ); \ 370 369 save = arg; \ 371 arg = MemAlloc( lstrlenW(arg)); \372 lstrcpyWtoA((LPSTR)arg, save); \370 arg = MemAlloc(_len); \ 371 WideCharToMultiByte( CP_ACP, 0, save, -1, (LPSTR)arg, _len, NULL, NULL ); \ 373 372 } 374 373 … … 391 390 if(arg) \ 392 391 { \ 393 lstrcpynAtoW(save, (LPCSTR)arg, len); \392 MultiByteToWideChar( CP_ACP, 0, (LPCSTR)(arg), -1, (save), (len) ); \ 394 393 MemFree(arg); \ 395 394 arg = save; \ … … 401 400 FileOpenDlgInfos *fodInfos; 402 401 HINSTANCE hInstance; 402 403 /* out arguments */ 404 LPWSTR lpstrFile = NULL; 405 LPWSTR lpstrFileTitle = NULL; 403 406 #ifdef __WIN32OS2__ 404 407 LPSTR lpstrSavDir = NULL; 405 408 #endif 406 /* out arguments */407 LPWSTR lpstrFile = NULL;408 LPWSTR lpstrFileTitle = NULL;409 409 410 410 /* in/out arguments */ … … 430 430 { 431 431 LPCWSTR s; 432 LPSTR x,y;433 int n ;432 LPSTR y; 433 int n, len; 434 434 435 435 lpstrFilter = ofn->lpstrFilter; … … 438 438 s = ofn->lpstrFilter; 439 439 440 while (*s) s = s+ lstrlenW(s)+1;440 while (*s) s = s+strlenW(s)+1; 441 441 s++; 442 442 n = s - ofn->lpstrFilter; /* already divides by 2. ptr magic */ 443 x = y = (LPSTR)MemAlloc(n); 444 s = (LPWSTR)ofn->lpstrFilter; 445 while (*s) 446 { 447 lstrcpyWtoA(x,s); 448 x+=strlen(x)+1; 449 s+=lstrlenW(s)+1; 450 } 451 *x=0; 443 len = WideCharToMultiByte( CP_ACP, 0, ofn->lpstrFilter, n, NULL, 0, NULL, NULL ); 444 y = (LPSTR)MemAlloc(len); 445 WideCharToMultiByte( CP_ACP, 0, ofn->lpstrFilter, n, y, len, NULL, NULL ); 452 446 #ifdef __WIN32OS2__ 453 447 ofn->lpstrFilter = (LPWSTR)y; … … 461 455 { 462 456 LPWSTR s; 463 LPSTR x,y;464 int n ;457 LPSTR y; 458 int n, len; 465 459 466 460 lpstrCustomFilter = ofn->lpstrCustomFilter; 467 461 /* filter is a list... title\0ext\0......\0\0 */ 468 462 s = ofn->lpstrCustomFilter; 469 while (*s) s = s+ lstrlenW(s)+1;463 while (*s) s = s+strlenW(s)+1; 470 464 s++; 471 465 n = s - ofn->lpstrCustomFilter; 472 x = y = (LPSTR)MemAlloc(n); 473 s = ofn->lpstrCustomFilter; 474 while (*s) 475 { 476 lstrcpyWtoA(x,s); 477 x+=strlen(x)+1; 478 s+=lstrlenW(s)+1; 479 } 480 *x=0; 466 len = WideCharToMultiByte( CP_ACP, 0, ofn->lpstrCustomFilter, n, NULL, 0, NULL, NULL ); 467 y = (LPSTR)MemAlloc(len); 468 WideCharToMultiByte( CP_ACP, 0, ofn->lpstrCustomFilter, n, y, len, NULL, NULL ); 481 469 #ifdef __WIN32OS2__ 482 470 ofn->lpstrCustomFilter = (LPWSTR)y; … … 791 779 792 780 if(fodInfos->ofnInfos->Flags & OFN_UNICODE) 793 FIXME("sending OPENFILENAMEA structure. Hook is expecting OPENFILENAMEW! ");781 FIXME("sending OPENFILENAMEA structure. Hook is expecting OPENFILENAMEW!\n"); 794 782 795 783 if(fodInfos->DlgInfos.hwndCustomDlg) … … 826 814 case CDM_GETFILEPATH: 827 815 GetDlgItemTextA(hwnd,IDC_FILENAME,lpstrPath, sizeof(lpstrPath)); 828 lpstrFileSpec = (LPSTR) COMDLG32_PathFindFileNameA(lpstrPath);816 lpstrFileSpec = (LPSTR)PathFindFileNameA(lpstrPath); 829 817 if (lpstrFileSpec==lpstrPath) 830 818 { 831 819 char lpstrCurrentDir[MAX_PATH]; 832 820 /* Prepend the current path */ 833 COMDLG32_SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrCurrentDir);821 SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrCurrentDir); 834 822 if ((LPSTR)lParam!=NULL) 835 wsnprintfA((LPSTR)lParam,(int)wParam,"%s\\%s",lpstrCurrentDir,lpstrPath);823 snprintf((LPSTR)lParam,(int)wParam,"%s\\%s",lpstrCurrentDir,lpstrPath); 836 824 reqSize=strlen(lpstrCurrentDir)+1+strlen(lpstrPath)+1; 837 825 } … … 845 833 846 834 case CDM_GETFOLDERPATH: 847 COMDLG32_SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrPath);835 SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrPath); 848 836 if ((LPSTR)lParam!=NULL) 849 837 lstrcpynA((LPSTR)lParam,lpstrPath,(int)wParam); … … 852 840 case CDM_GETSPEC: 853 841 reqSize=GetDlgItemTextA(hwnd,IDC_FILENAME,lpstrPath, sizeof(lpstrPath)); 854 lpstrFileSpec = (LPSTR) COMDLG32_PathFindFileNameA(lpstrPath);842 lpstrFileSpec = (LPSTR)PathFindFileNameA(lpstrPath); 855 843 if ((LPSTR)lParam!=NULL) 856 844 lstrcpynA((LPSTR)lParam, lpstrFileSpec, (int)wParam); … … 898 886 FILEDLG95_FillControls(hwnd, wParam, lParam); 899 887 SendCustomDlgNotificationMessage(hwnd,CDN_SELCHANGE); 888 SetWindowPos(fodInfos->DlgInfos.hwndCustomDlg, HWND_BOTTOM, 889 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE); 900 890 return 0; 901 891 } … … 1037 1027 if(fodInfos->ofnInfos->lpstrFile) 1038 1028 { 1039 LPSTR lpstrFile = COMDLG32_PathFindFileNameA(fodInfos->ofnInfos->lpstrFile);1029 LPSTR lpstrFile = PathFindFileNameA(fodInfos->ofnInfos->lpstrFile); 1040 1030 SetDlgItemTextA(hwnd, IDC_FILENAME, lpstrFile); 1041 1031 } … … 1238 1228 lpstrFile[0] = '\0'; 1239 1229 1240 COMDLG32_SHGetPathFromIDListA( fodInfos->ShellInfos.pidlAbsCurrent, lpstrPathSpec );1230 SHGetPathFromIDListA( fodInfos->ShellInfos.pidlAbsCurrent, lpstrPathSpec ); 1241 1231 1242 1232 if ( !(fodInfos->ofnInfos->Flags & OFN_NOVALIDATE) && … … 1351 1341 1352 1342 /* Get the current directory name */ 1353 if (! COMDLG32_SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent, lpstrPathAndFile))1343 if (!SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent, lpstrPathAndFile)) 1354 1344 { 1355 1345 /* we are in a special folder, default to desktop */ 1356 if(FAILED(COMDLG32_SHGetFolderPathA(hwnd, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE, NULL, 0, lpstrPathAndFile)))1346 if(FAILED(COMDLG32_SHGetFolderPathA(hwnd, CSIDL_DESKTOPDIRECTORY|CSIDL_FLAG_CREATE, 0, 0, lpstrPathAndFile))) 1357 1347 { 1358 1348 /* last fallback */ … … 1360 1350 } 1361 1351 } 1362 COMDLG32_PathAddBackslashA(lpstrPathAndFile);1352 PathAddBackslashA(lpstrPathAndFile); 1363 1353 1364 1354 TRACE("current directory=%s\n", lpstrPathAndFile); 1365 1355 1366 1356 /* if the user specifyed a fully qualified path use it */ 1367 if( COMDLG32_PathIsRelativeA(lpstrFileList))1357 if(PathIsRelativeA(lpstrFileList)) 1368 1358 { 1369 1359 strcat(lpstrPathAndFile, lpstrFileList); … … 1372 1362 { 1373 1363 /* does the path have a drive letter? */ 1374 if ( COMDLG32_PathGetDriveNumberA(lpstrFileList) == -1)1364 if (PathGetDriveNumberA(lpstrFileList) == -1) 1375 1365 strcpy(lpstrPathAndFile+2, lpstrFileList); 1376 1366 else … … 1379 1369 1380 1370 /* resolve "." and ".." */ 1381 COMDLG32_PathCanonicalizeA(lpstrTemp, lpstrPathAndFile );1371 PathCanonicalizeA(lpstrTemp, lpstrPathAndFile ); 1382 1372 strcpy(lpstrPathAndFile, lpstrTemp); 1383 1373 TRACE("canon=%s\n", lpstrPathAndFile); … … 1412 1402 } 1413 1403 1414 if (FAILED ( COMDLG32_SHGetDesktopFolder(&lpsf))) return FALSE;1404 if (FAILED (SHGetDesktopFolder(&lpsf))) return FALSE; 1415 1405 1416 1406 lpszTemp1 = lpszTemp = lpstrPathAndFile; … … 1421 1411 DWORD dwEaten, dwAttributes; 1422 1412 1423 lpszTemp = COMDLG32_PathFindNextComponentA(lpszTemp);1413 lpszTemp = PathFindNextComponentA(lpszTemp); 1424 1414 1425 1415 if (!lpszTemp) break; /* end of path */ 1426 1416 1427 1417 if(*lpszTemp) 1428 lstrcpynAtoW(lpwstrTemp, lpszTemp1, lpszTemp - lpszTemp1); 1418 { 1419 DWORD len = MultiByteToWideChar( CP_ACP, 0, lpszTemp1, lpszTemp - lpszTemp1, 1420 lpwstrTemp, MAX_PATH ); 1421 lpwstrTemp[len] = 0; 1422 } 1429 1423 else 1430 1424 { 1431 lstrcpyAtoW(lpwstrTemp, lpszTemp1); /* last element */ 1425 MultiByteToWideChar( CP_ACP, 0, lpszTemp1, -1, 1426 lpwstrTemp, sizeof(lpwstrTemp)/sizeof(WCHAR) ); 1432 1427 1433 1428 /* if the last element is a wildcard do a search */ … … 1442 1437 TRACE("parse now=%s next=%s sf=%p\n",debugstr_w(lpwstrTemp), debugstr_a(lpszTemp), lpsf); 1443 1438 1444 if(lstrlenW(lpwstrTemp)==2) COMDLG32_PathAddBackslashW(lpwstrTemp);1439 if(lstrlenW(lpwstrTemp)==2) PathAddBackslashW(lpwstrTemp); 1445 1440 1446 1441 dwAttributes = SFGAO_FOLDER; … … 1513 1508 { 1514 1509 int iPos; 1515 LPSTR lpszTemp = COMDLG32_PathFindFileNameA(lpstrPathAndFile); 1510 LPSTR lpszTemp = PathFindFileNameA(lpstrPathAndFile); 1511 DWORD len; 1516 1512 1517 1513 /* replace the current filter */ 1518 1514 if(fodInfos->ShellInfos.lpstrCurrentFilter) 1519 1515 MemFree((LPVOID)fodInfos->ShellInfos.lpstrCurrentFilter); 1520 fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc((strlen(lpszTemp)+1)*sizeof(WCHAR)); 1521 lstrcpyAtoW(fodInfos->ShellInfos.lpstrCurrentFilter, lpszTemp); 1516 len = MultiByteToWideChar( CP_ACP, 0, lpszTemp, -1, NULL, 0 ); 1517 fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc(len * sizeof(WCHAR)); 1518 MultiByteToWideChar( CP_ACP, 0, lpszTemp, -1, 1519 fodInfos->ShellInfos.lpstrCurrentFilter, len ); 1522 1520 1523 1521 /* set the filter cb to the extension when possible */ … … 1554 1552 if (fodInfos->ofnInfos->lpstrDefExt) 1555 1553 { 1556 if (! * COMDLG32_PathFindExtensionA(lpstrPathAndFile))1554 if (! *PathFindExtensionA(lpstrPathAndFile)) 1557 1555 { 1558 1556 strcat(lpstrPathAndFile, "."); … … 1561 1559 } 1562 1560 1563 /* Check that size size of the file does not exceed buffer size */ 1564 if(strlen(lpstrPathAndFile) < fodInfos->ofnInfos->nMaxFile) 1561 /* Check that the size of the file does not exceed buffer size. 1562 (Allow for extra \0 if OFN_MULTISELECT is set.) */ 1563 if(strlen(lpstrPathAndFile) < fodInfos->ofnInfos->nMaxFile - 1564 ((fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT) ? 1 : 0)) 1565 1565 { 1566 1566 LPSTR lpszTemp; … … 1568 1568 /* fill destination buffer */ 1569 1569 strcpy(fodInfos->ofnInfos->lpstrFile, lpstrPathAndFile); 1570 if (fodInfos->ofnInfos->Flags & OFN_ALLOWMULTISELECT) 1571 fodInfos->ofnInfos->lpstrFile[strlen(fodInfos->ofnInfos->lpstrFile) 1572 + 1] = '\0'; 1570 1573 1571 1574 /* set filename offset */ 1572 lpszTemp = COMDLG32_PathFindFileNameA(lpstrPathAndFile);1575 lpszTemp = PathFindFileNameA(lpstrPathAndFile); 1573 1576 fodInfos->ofnInfos->nFileOffset = lpszTemp - lpstrPathAndFile; 1574 1577 1575 1578 /* set extension offset */ 1576 lpszTemp = COMDLG32_PathFindExtensionA(lpstrPathAndFile);1579 lpszTemp = PathFindExtensionA(lpstrPathAndFile); 1577 1580 fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? lpszTemp - lpstrPathAndFile + 1 : 0; 1578 1581 … … 1580 1583 if(fodInfos->ofnInfos->lpstrFileTitle) 1581 1584 { 1582 LPSTR lpstrFileTitle = COMDLG32_PathFindFileNameA(lpstrPathAndFile);1585 LPSTR lpstrFileTitle = PathFindFileNameA(lpstrPathAndFile); 1583 1586 strncpy(fodInfos->ofnInfos->lpstrFileTitle, lpstrFileTitle, fodInfos->ofnInfos->nMaxFileTitle); 1584 1587 } … … 1725 1728 TRACE("\n"); 1726 1729 1727 COMDLG32_SHGetSpecialFolderLocation(0,CSIDL_DESKTOP,&pidl);1730 SHGetSpecialFolderLocation(0,CSIDL_DESKTOP,&pidl); 1728 1731 hres = IShellBrowser_BrowseObject(fodInfos->Shell.FOIShellBrowser, pidl, SBSP_ABSOLUTE); 1729 1732 COMDLG32_SHFree(pidl); … … 1820 1823 if(lpstrFilter) 1821 1824 { 1825 DWORD len; 1822 1826 _strlwr(lpstrFilter); /* lowercase */ 1823 fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc((strlen(lpstrFilter)+1)*2); 1824 lstrcpyAtoW(fodInfos->ShellInfos.lpstrCurrentFilter, lpstrFilter); 1827 len = MultiByteToWideChar( CP_ACP, 0, lpstrFilter, -1, NULL, 0 ); 1828 fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc( len * sizeof(WCHAR) ); 1829 MultiByteToWideChar( CP_ACP, 0, lpstrFilter, -1, 1830 fodInfos->ShellInfos.lpstrCurrentFilter, len ); 1825 1831 } 1826 1832 } … … 1858 1864 if((int)lpstrFilter != CB_ERR) 1859 1865 { 1860 fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc((strlen(lpstrFilter)+1)*2); 1861 lstrcpyAtoW(fodInfos->ShellInfos.lpstrCurrentFilter,_strlwr(lpstrFilter)); 1862 SendCustomDlgNotificationMessage(hwnd,CDN_TYPECHANGE); 1866 DWORD len; 1867 _strlwr(lpstrFilter); /* lowercase */ 1868 len = MultiByteToWideChar( CP_ACP, 0, lpstrFilter, -1, NULL, 0 ); 1869 fodInfos->ShellInfos.lpstrCurrentFilter = MemAlloc( len * sizeof(WCHAR) ); 1870 MultiByteToWideChar( CP_ACP, 0, lpstrFilter, -1, 1871 fodInfos->ShellInfos.lpstrCurrentFilter, len ); 1872 SendCustomDlgNotificationMessage(hwnd,CDN_TYPECHANGE); 1863 1873 } 1864 1874 … … 1943 1953 1944 1954 /* Initialise data of Desktop folder */ 1945 COMDLG32_SHGetSpecialFolderLocation(0,CSIDL_DESKTOP,&pidlTmp);1955 SHGetSpecialFolderLocation(0,CSIDL_DESKTOP,&pidlTmp); 1946 1956 FILEDLG95_LOOKIN_AddItem(hwndCombo, pidlTmp,LISTEND); 1947 1957 COMDLG32_SHFree(pidlTmp); 1948 1958 1949 COMDLG32_SHGetSpecialFolderLocation(0,CSIDL_DRIVES,&pidlDrives);1950 1951 COMDLG32_SHGetDesktopFolder(&psfRoot);1959 SHGetSpecialFolderLocation(0,CSIDL_DRIVES,&pidlDrives); 1960 1961 SHGetDesktopFolder(&psfRoot); 1952 1962 1953 1963 if (psfRoot) … … 2024 2034 if(pDIStruct->itemID == liInfos->uSelectedItem) 2025 2035 { 2026 ilItemImage = (HIMAGELIST) COMDLG32_SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,2036 ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 2027 2037 0, 2028 2038 &sfi, … … 2034 2044 else 2035 2045 { 2036 ilItemImage = (HIMAGELIST) COMDLG32_SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,2046 ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 2037 2047 0, 2038 2048 &sfi, … … 2061 2071 { 2062 2072 iIndentation = 0; 2063 ilItemImage = (HIMAGELIST) COMDLG32_SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem,2073 ilItemImage = (HIMAGELIST) SHGetFileInfoA ((LPCSTR) tmpFolder->pidlItem, 2064 2074 0, 2065 2075 &sfi, … … 2091 2101 2092 2102 /* Draw the icon from the image list */ 2093 COMDLG32_ImageList_Draw(ilItemImage,2103 ImageList_Draw(ilItemImage, 2094 2104 sfi.iIcon, 2095 2105 pDIStruct->hDC, … … 2182 2192 2183 2193 sfi.dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM; 2184 COMDLG32_SHGetFileInfoA((LPSTR)pidl,2194 SHGetFileInfoA((LPSTR)pidl, 2185 2195 0, 2186 2196 &sfi, … … 2672 2682 { 2673 2683 HRESULT hRes; 2674 COMDLG32_SHGetDesktopFolder(&lpsf);2684 SHGetDesktopFolder(&lpsf); 2675 2685 hRes = GetName(lpsf,pidl,dwFlags,lpstrFileName); 2676 2686 IShellFolder_Release(lpsf); … … 2698 2708 TRACE("%p\n", pidlAbs); 2699 2709 2700 if(SUCCEEDED( COMDLG32_SHGetDesktopFolder(&psfParent)))2710 if(SUCCEEDED(SHGetDesktopFolder(&psfParent))) 2701 2711 { 2702 2712 psf = psfParent; … … 2736 2746 * 2737 2747 * returns the pidl of the file name relative to folder 2738 * NULL if an error occur ed2748 * NULL if an error occurred 2739 2749 */ 2740 2750 LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPCSTR lpcstrFileName) … … 2746 2756 TRACE("sf=%p file=%s\n", lpsf, lpcstrFileName); 2747 2757 2748 #ifdef __WIN32OS2__2749 if(!lpcstrFileName || *lpcstrFileName == 0) return NULL;2750 #else2751 2758 if(!lpcstrFileName) return NULL; 2752 #endif 2759 if(!*lpcstrFileName) return NULL; 2753 2760 2754 2761 MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH); … … 2756 2763 if(!lpsf) 2757 2764 { 2758 COMDLG32_SHGetDesktopFolder(&lpsf);2765 SHGetDesktopFolder(&lpsf); 2759 2766 pidl = GetPidlFromName(lpsf, lpcstrFileName); 2760 2767 IShellFolder_Release(lpsf); -
trunk/src/comdlg32/filedlgbrowser.c
r4561 r5583 5 5 */ 6 6 7 #include <stdio.h> 8 #include <string.h> 9 10 #include "windef.h" 11 #include "winbase.h" 12 #include "winnls.h" 13 #include "wingdi.h" 14 #include "winuser.h" 15 #include "heap.h" 16 #include "debugtools.h" 17 18 #include "shlwapi.h" 19 #include "filedlgbrowser.h" 20 #include "cdlg.h" 21 #include "shlguid.h" 22 #include "wine/obj_serviceprovider.h" 23 7 24 #ifdef __WIN32OS2__ 8 #include <windef.h>9 #include <winbase.h>10 #include <wingdi.h>11 #include <winuser.h>12 25 #include <heapstring.h> 13 26 #include <misc.h> 14 15 27 #endif 16 17 #include <stdio.h>18 #include "unknwn.h"19 #include "filedlgbrowser.h"20 #include "windef.h"21 #include "wingdi.h"22 #include "winuser.h"23 #include "wine/winestring.h"24 #include "heap.h"25 #include "shlguid.h"26 #include "wine/obj_dataobject.h"27 #include "debugtools.h"28 #include "cdlg.h"29 30 #define INITGUID31 #include "initguid.h"32 #include "wine/obj_serviceprovider.h"33 28 34 29 DEFAULT_DEBUG_CHANNEL(commdlg); … … 84 79 * Helper functions 85 80 */ 81 82 static void COMDLG32_UpdateCurrentDir(FileOpenDlgInfos *fodInfos) 83 { 84 char lpstrPath[MAX_PATH]; 85 SHGetPathFromIDListA(fodInfos->ShellInfos.pidlAbsCurrent,lpstrPath); 86 SetCurrentDirectoryA(lpstrPath); 87 TRACE("new current folder %s\n", lpstrPath); 88 } 86 89 87 90 /* copied from shell32 to avoid linking to it */ … … 98 101 99 102 case STRRET_CSTRA: 100 lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len); 103 if (len && !MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, (LPWSTR)dest, len )) 104 ((LPWSTR)dest)[len-1] = 0; 101 105 break; 102 106 … … 104 108 if (pidl) 105 109 { 106 lstrcpynAtoW((LPWSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); 110 if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, 111 -1, (LPWSTR)dest, len )) 112 ((LPWSTR)dest)[len-1] = 0; 107 113 } 108 114 break; … … 111 117 FIXME("unknown type!\n"); 112 118 if (len) 113 { *(LP STR)dest = '\0';119 { *(LPWSTR)dest = '\0'; 114 120 } 115 121 return(FALSE); … … 140 146 sb->lpVtblCommDlgBrowser = &IShellBrowserImpl_ICommDlgBrowser_Vtbl; 141 147 sb->lpVtblServiceProvider = &IShellBrowserImpl_IServiceProvider_Vtbl; 142 COMDLG32_SHGetSpecialFolderLocation(hwndOwner, CSIDL_DESKTOP,148 SHGetSpecialFolderLocation(hwndOwner, CSIDL_DESKTOP, 143 149 &fodInfos->ShellInfos.pidlAbsCurrent); 144 150 … … 157 163 ICOM_THIS(IShellBrowserImpl, iface); 158 164 159 #ifndef __WIN32OS2__160 165 TRACE("(%p)\n\t%s\n", This, debugstr_guid(riid)); 161 #endif162 166 163 167 *ppvObj = NULL; … … 376 380 COMDLG32_SHFree((LPVOID)fodInfos->ShellInfos.pidlAbsCurrent); 377 381 fodInfos->ShellInfos.pidlAbsCurrent = pidlTmp; 382 383 COMDLG32_UpdateCurrentDir(fodInfos); 378 384 379 385 /* Create the window */ … … 791 797 if (SUCCEEDED(COMDLG32_StrRetToStrNW(szPathW, MAX_PATH, &str, pidl))) 792 798 { 793 if ( COMDLG32_PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter))799 if (PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter)) 794 800 return S_OK; 795 801 } … … 905 911 _ICOM_THIS_FromIServiceProvider(IShellBrowser,iface); 906 912 907 #ifndef __WIN32OS2__908 913 FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) ); 909 #endif910 914 911 915 *ppv = NULL; -
trunk/src/comdlg32/fontdlg.c
r4514 r5583 884 884 break; 885 885 886 case psh15:i=RegisterWindowMessageA( HELPMSGSTRING );886 case psh15:i=RegisterWindowMessageA( HELPMSGSTRINGA ); 887 887 if (lpcf->hwndOwner) 888 888 SendMessageA(lpcf->hwndOwner, i, 0, (LPARAM)GetWindowLongA(hDlg, DWL_USER)); -
trunk/src/comdlg32/makefile
r5579 r5583 1 # $Id: makefile,v 1.2 4 2001-04-24 19:44:26sandervl Exp $1 # $Id: makefile,v 1.25 2001-04-24 20:37:25 sandervl Exp $ 2 2 3 3 # … … 17 17 # Overrides. 18 18 # 19 !if "$(CCENV)" == "VAC36" 19 20 CDEFINES = $(CDEFINES) -DNONAMELESSUNION 21 !endif 20 22 21 23 #
Note:
See TracChangeset
for help on using the changeset viewer.