- Timestamp:
- Sep 13, 1999, 2:36:35 PM (26 years ago)
- Location:
- trunk/src/shell32/new
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/new/brsfolder.cpp
r800 r918 13 13 #include "debugtools.h" 14 14 #include "winreg.h" 15 #include "authors.h" 15 16 #include "winnls.h" 16 17 #include "commctrl.h" … … 96 97 if (SUCCEEDED(IShellFolder_GetDisplayNameOf(lpsf, lpi, dwFlags, &str))) 97 98 { 98 bSuccess = StrRetToStrNA (lpFriendlyName, MAX_PATH, &str, lpi); 99 if(FAILED(StrRetToStrNA (lpFriendlyName, MAX_PATH, &str, lpi))) 100 { 101 bSuccess = FALSE; 102 } 99 103 } 100 104 else … … 118 122 HWND hwnd=GetParent(hwndTreeView); 119 123 120 TRACE("%p %p %x\n",lpsf, pidl, (INT)hParent); 121 124 TRACE("%p %p %x\n",lpsf, pidl, (INT)hParent); 122 125 SetCapture(GetParent(hwndTreeView)); 123 126 SetCursor(LoadCursorA(0, IDC_WAITA)); … … 158 161 tvins.hParent = hParent; 159 162 160 hPrev = (HTREEITEM)TreeView_InsertItem W(hwndTreeView, &tvins);163 hPrev = (HTREEITEM)TreeView_InsertItemA (hwndTreeView, &tvins); 161 164 162 165 } -
trunk/src/shell32/new/pidl.cpp
r873 r918 142 142 } 143 143 144 145 144 /************************************************************************* 146 145 * ILGetDisplayName [SHELL32.15] … … 852 851 HANDLE handle; 853 852 854 if ( len < sizeof (WIN32_FIND_DATAA)) 853 if ( len < sizeof (WIN32_FIND_DATAA)) { 854 ERR_(shell)("%d does not find sizeof(finddata)\n",len); 855 855 return E_INVALIDARG; 856 } 856 857 857 858 SHGetPathFromIDListA(pidl, pszPath); … … 879 880 HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len) 880 881 { 881 FIXME_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); 882 882 if (! psf || !dest ) return E_INVALIDARG; 883 884 switch (nFormat) 885 { 886 case SHGDFIL_FINDDATA: 887 { 888 WIN32_FIND_DATAW * pfd = (WIN32_FIND_DATAW*)dest; 889 WCHAR pszPath[MAX_PATH]; 890 HANDLE handle; 891 892 if ( len < sizeof (WIN32_FIND_DATAW)) { 893 ERR_(shell)("%d does not find sizeof(finddata)\n",len); 894 return E_INVALIDARG; 895 } 896 SHGetPathFromIDListW(pidl, pszPath); 897 if ((handle = FindFirstFileW ( pszPath, pfd))) 898 FindClose (handle); 899 } 900 return NOERROR; 901 default: /* fallthrough */ 902 break; 903 } 904 FIXME_(shell)("(sf=%p pidl=%p nFormat=0x%04x %p 0x%04x), unhandled.\n",psf,pidl,nFormat,dest,len); 883 905 return SHGetDataFromIDListA( psf, pidl, nFormat, dest, len); 884 906 } -
trunk/src/shell32/new/shell32_main.cpp
r898 r918 656 656 } 657 657 break; 658 case WM_CLOSE: 659 EndDialog(hWnd, TRUE); 660 break; 658 661 } 659 662 return 0; -
trunk/src/shell32/new/shellpath.cpp
r873 r918 433 433 } 434 434 /************************************************************************* 435 * PathMatchSingleMask 436 * 437 * NOTES 438 * internal (used by PathMatchSpec) 439 */ 440 static BOOL PathMatchSingleMaskA(LPCSTR name, LPCSTR mask) 441 { 442 while (*name && *mask && *mask!=';') { 443 if (*mask=='*') { 444 do { 445 if (PathMatchSingleMaskA(name,mask+1)) return 1; /* try substrings */ 446 } while (*name++); 447 return 0; 448 } 449 if (toupper(*mask)!=toupper(*name) && *mask!='?') return 0; 450 name++; 451 mask++; 452 } 453 if (!*name) { 454 while (*mask=='*') mask++; 455 if (!*mask || *mask==';') return 1; 456 } 457 return 0; 458 } 459 static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask) 460 { 461 while (*name && *mask && *mask!=';') { 462 if (*mask=='*') { 463 do { 464 if (PathMatchSingleMaskW(name,mask+1)) return 1; /* try substrings */ 465 } while (*name++); 466 return 0; 467 } 468 if (towupper(*mask)!=towupper(*name) && *mask!='?') return 0; 469 name++; 470 mask++; 471 } 472 if (!*name) { 473 while (*mask=='*') mask++; 474 if (!*mask || *mask==';') return 1; 475 } 476 return 0; 477 } 478 /************************************************************************* 435 479 * PathMatchSpec [SHELL32.46] 436 480 * … … 438 482 * used from COMDLG32 439 483 */ 440 441 484 BOOL WINAPI PathMatchSpecA(LPCSTR name, LPCSTR mask) 442 { LPCSTR _name; 443 444 TRACE("%s %s stub\n",name,mask); 445 446 _name = name; 447 while (*_name && *mask) 448 { if (*mask ==';') 449 { mask++; 450 _name = name; 485 { 486 TRACE("%s %s\n",name,mask); 487 488 if (!lstrcmpA( mask, "*.*" )) return 1; /* we don't require a period */ 489 490 while (*mask) { 491 if (PathMatchSingleMaskA(name,mask)) return 1; /* helper function */ 492 while (*mask && *mask!=';') mask++; 493 if (*mask==';') { 494 mask++; 495 while (*mask==' ') mask++; /* masks may be separated by "; " */ 451 496 } 452 else if (*mask == '*') 453 { mask++; 454 while (*mask == '*') mask++; /* Skip consecutive '*' */ 455 if (!*mask || *mask==';') return TRUE; /* '*' matches everything */ 456 while (*_name && (toupper(*_name) != toupper(*mask))) _name++; 457 if (!*_name) 458 { while ( *mask && *mask != ';') mask++; 459 _name = name; 460 } 461 } 462 else if ( (*mask == '?') || (toupper(*mask) == toupper(*_name)) ) 463 { mask++; 464 _name++; 465 } 466 else 467 { while ( *mask && *mask != ';') mask++; 468 } 469 } 470 return (!*_name && (!*mask || *mask==';')); 497 } 498 return 0; 471 499 } 472 500 BOOL WINAPI PathMatchSpecW(LPCWSTR name, LPCWSTR mask) 473 501 { WCHAR stemp[4]; 474 LPCWSTR _name; 475 476 TRACE("%s %s stub\n",debugstr_w(name),debugstr_w(mask)); 477 502 TRACE("%ls %ls\n",name,mask); 478 503 lstrcpyAtoW(stemp,"*.*"); 479 if (!lstrcmpW( mask, stemp )) return 1; 480 481 _name = name; 482 while (*_name && *mask) 483 { if (*mask ==';') 484 { mask++; 485 _name = name; 504 if (!lstrcmpW( mask, stemp )) return 1; /* we don't require a period */ 505 506 while (*mask) { 507 if (PathMatchSingleMaskW(name,mask)) return 1; /* helper function */ 508 while (*mask && *mask!=';') mask++; 509 if (*mask==';') { 510 mask++; 511 while (*mask==' ') mask++; /* masks may be separated by "; " */ 486 512 } 487 else if (*mask == '*') 488 { mask++; 489 while (*mask == '*') mask++; /* Skip consecutive '*' */ 490 if (!*mask || *mask==';') return TRUE; /* '*' matches everything */ 491 while (*_name && (towupper(*_name) != towupper(*mask))) _name++; 492 if (!*_name) 493 { while ( *mask && *mask != ';') mask++; 494 _name = name; 495 } 496 } 497 else if ( (*mask == '?') || (towupper(*mask) == towupper(*_name)) ) 498 { mask++; 499 _name++; 500 } 501 else 502 { while ( *mask && *mask != ';') mask++; 503 } 504 } 505 return (!*_name && (!*mask || *mask==';')); 513 } 514 return 0; 506 515 } 507 516 BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask) -
trunk/src/shell32/new/shlfolder.cpp
r857 r918 834 834 { 835 835 pObj = (LPUNKNOWN)IContextMenu_Constructor((IShellFolder *)This, This->absPidl, apidl, cidl); 836 hr = S_OK; 836 837 } 837 838 else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) -
trunk/src/shell32/new/shlview.cpp
r898 r918 233 233 TRACE("%p\n",This); 234 234 235 dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER | 235 dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | 236 236 LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_AUTOARRANGE; 237 237 … … 794 794 ShellView_OnActivate(This, SVUIA_ACTIVATE_FOCUS); 795 795 796 /* Set the focus to the listview */ 797 SetFocus(This->hWndList); 798 799 /* Notify the ICommDlgBrowser interface */ 800 OnStateChange(This,CDBOSC_SETFOCUS); 801 796 802 return 0; 797 803 } … … 805 811 806 812 ShellView_OnActivate(This, SVUIA_ACTIVATE_NOFOCUS); 813 /* Notify the ICommDlgBrowser */ 814 OnStateChange(This,CDBOSC_KILLFOCUS); 807 815 808 816 return 0; … … 866 874 TRACE("-- NM_KILLFOCUS %p\n",This); 867 875 ShellView_OnDeactivate(This); 876 /* Notify the ICommDlgBrowser interface */ 877 OnStateChange(This,CDBOSC_KILLFOCUS); 868 878 break; 869 879 … … 1036 1046 break; 1037 1047 1048 case WM_GETDLGCODE: return SendMessageA(pThis->hWndList,uMessage,0,0); 1049 1038 1050 case WM_DESTROY: pRevokeDragDrop(pThis->hWnd); 1039 1051 break; … … 1293 1305 SV_CLASS_NAME, 1294 1306 NULL, 1295 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS ,1307 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_TABSTOP, 1296 1308 prcView->left, 1297 1309 prcView->top,
Note:
See TracChangeset
for help on using the changeset viewer.