55 #define NONAMELESSUNION 65 #define _WIN32_WINNT 0x0600 81 #include "wine/unicode.h" 86 #define UNIMPLEMENTED_FLAGS \ 87 (OFN_DONTADDTORECENT |\ 88 OFN_NODEREFERENCELINKS | OFN_NOREADONLYRETURN |\ 89 OFN_NOTESTFILECREATE ) 112 static HHOOK s_hFileDialogHook =
NULL;
113 static LONG s_nFileDialogHookCount = 0;
115 #define MAX_TRANSLATE 8 116 static HWND s_ahwndTranslate[MAX_TRANSLATE] = {
NULL };
118 static void FILEDLG95_AddRemoveTranslate(
HWND hwndOld,
HWND hwndNew)
121 for (
i = 0;
i < MAX_TRANSLATE; ++
i)
123 if (s_ahwndTranslate[
i] == hwndOld)
125 s_ahwndTranslate[
i] = hwndNew;
137 if (s_ahwndTranslate[
i] ==
NULL)
141 if (fodInfos ==
NULL)
145 if (hwndView == hwndFocus ||
IsChild(hwndView, hwndFocus))
147 IShellView_TranslateAccelerator(fodInfos->
Shell.FOIShellView, pMsg);
170 for (
i = 0;
i < MAX_TRANSLATE; ++
i)
172 if (FILEDLG95_DoTranslate(
i, hwndFocus, pMsg))
187 #define XTEXTOFFSET 3 193 #define SEARCH_PIDL 1 195 #define ITEM_NOTFOUND -1 198 #define WM_GETISHELLBROWSER WM_USER+7 200 #define TBPLACES_CMDID_PLACE0 0xa064 201 #define TBPLACES_CMDID_PLACE1 0xa065 202 #define TBPLACES_CMDID_PLACE2 0xa066 203 #define TBPLACES_CMDID_PLACE3 0xa067 204 #define TBPLACES_CMDID_PLACE4 0xa068 212 #define CBGetItemDataPtr(hwnd,iItemId) \ 213 SendMessageW(hwnd, CB_GETITEMDATA, (WPARAM)(iItemId), 0) 219 {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
220 'W',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'\\',
221 'E',
'x',
'p',
'l',
'o',
'r',
'e',
'r',
'\\',
'C',
'o',
'm',
'D',
'l',
'g',
'3',
'2',
'\\',
222 'L',
'a',
's',
't',
'V',
'i',
's',
'i',
't',
'e',
'd',
'M',
'R',
'U',0};
225 static const WCHAR filedlg_info_propnameW[] = {
'F',
'i',
'l',
'e',
'O',
'p',
'e',
'n',
'D',
'l',
'g',
'I',
'n',
'f',
'o',
's',0};
356 static const WCHAR noplacesbarW[] = {
'N',
'o',
'P',
'l',
'a',
'c',
'e',
's',
'B',
'a',
'r',0};
378 static const int default_places[] =
400 static const WCHAR placeW[] = {
'P',
'l',
'a',
'c',
'e',
'%',
'd',0};
411 WARN(
"Unrecognized special folder %u.\n",
value);
453 FIXME(
"Flags 0x%08x not yet implemented\n",
460 templateid = NEWFILEOPENV2ORD;
462 templateid = NEWFILEOPENORD;
507 fodInfos->ofnInfos->hwndOwner,
510 if (fodInfos->ole_initialized)
669 if (
ret &&
info->ofnInfos->lpstrFile &&
info->ofnInfos->lpstrFileTitle)
714 LPSHELLFOLDER psfDesktop;
720 if (
FAILED(IShellFolder_GetDisplayNameOf(psfDesktop, pidl, SHGDN_FORPARSING, &strret))) {
721 IShellFolder_Release(psfDesktop);
725 IShellFolder_Release(psfDesktop);
752 lstrcatW(lpstrPathAndFile, lpstrFile);
758 lstrcpyW(lpstrPathAndFile+2, lpstrFile);
760 lstrcpyW(lpstrPathAndFile, lpstrFile);
765 lstrcpyW(lpstrPathAndFile, lpstrTemp);
776 UINT nStrCharCount = 0;
786 while ( nStrCharCount <= nStrLen )
788 if ( lpstrEdit[nStrCharCount]==
'"' )
791 while ((nStrCharCount <= nStrLen) && (lpstrEdit[nStrCharCount]!=
'"'))
793 (*lpstrFileList)[nFileIndex++] = lpstrEdit[nStrCharCount];
796 (*lpstrFileList)[nFileIndex++] = 0;
803 if ((nStrLen > 0) && (nFileIndex == 0) )
805 lstrcpyW(*lpstrFileList, lpstrEdit);
806 nFileIndex =
lstrlenW(lpstrEdit) + 1;
811 (*lpstrFileList)[nFileIndex++] =
'\0';
813 *sizeUsed = nFileIndex;
824 HWND hwndChild, hwndStc32;
825 RECT rectParent, rectChild, rectStc32;
834 RECT rectHelp, rectCancel;
859 rectParent.
bottom -= help_fixup;
882 if (hwndChild != hwndStc32)
888 if (hwndStc32 && rectChild.left > rectStc32.
right)
891 rectChild.left += rectParent.
right;
892 rectChild.left -= rectStc32.
right;
895 if (rectChild.top >= rectStc32.
bottom)
898 rectChild.top += rectParent.
bottom;
899 rectChild.top -= rectStc32.
bottom - rectStc32.
top;
902 SetWindowPos(hwndChild, 0, rectChild.left, rectChild.top,
912 if (hwndChild != hwndChildDlg)
920 rectChild.left += rectStc32.
left;
921 rectChild.top += rectStc32.
top;
923 SetWindowPos(hwndChild, 0, rectChild.left, rectChild.top,
946 chgy = rectChild.
bottom - ( rectStc32.
bottom - rectStc32.
top) - help_fixup;
956 chgy = rectChild.
bottom - help_fixup;
962 rectParent.
right - rectParent.
left + chgx,
963 rectParent.
bottom - rectParent.
top + chgy,
1046 temp.tmplate.dwExtendedStyle = 0;
1047 temp.tmplate.cdit = 0;
1050 temp.tmplate.cx = 0;
1051 temp.tmplate.cy = 0;
1074 TRACE(
"%p %d\n", hwndParentDlg, uCode);
1076 if (!fodInfos || !fodInfos->
DlgInfos.hwndCustomDlg)
1079 TRACE(
"CALL NOTIFY for %d\n", uCode);
1092 TRACE(
"RET NOTIFY retval %#lx\n", hook_result);
1103 TRACE(
"CDM_GETFILEPATH:\n");
1145 if(!fodInfos)
return FALSE;
1154 TRACE(
"CDM_GETFOLDERPATH:\n");
1174 TRACE(
"CDM_GETSPEC:\n");
1186 TRACE(
"CDM_SETCONTROLTEXT:\n");
1205 else retval =
FALSE;
1210 FIXME(
"message CDM_FIRST+%04x not implemented\n", uMsg -
CDM_FIRST);
1272 rcview.right - rcview.left + chgx,
1273 rcview.bottom - rcview.top + chgy,
1287 else if( rc.top > rcview.bottom)
1298 rc.right - rc.left + chgx, rc.bottom - rc.top,
1315 else if( rc.left > rcview.right)
1331 rc.right - rc.left + chgx, rc.bottom - rc.top,
1345 rc.right - rc.left + chgx,
1346 rc.bottom - rc.top + chgy,
1356 if(fodInfos->
DlgInfos.hwndCustomDlg &&
1364 if( rc.top > rcview.bottom)
1369 rc.right - rc.left, rc.bottom - rc.top,
1372 else if( rc.left > rcview.right)
1377 rc.right - rc.left, rc.bottom - rc.top,
1462 if( fodInfos->
DlgInfos.hwndCustomDlg)
1478 rcstc.left, rcstc.top, rcstc.right - rcstc.left, rcstc.bottom - rcstc.top,
1506 if (++s_nFileDialogHookCount == 1)
1511 FILEDLG95_AddRemoveTranslate(
NULL,
hwnd);
1554 FILEDLG95_AddRemoveTranslate(
hwnd,
NULL);
1555 if (--s_nFileDialogHookCount == 0)
1558 s_hFileDialogHook =
NULL;
1632 static const WCHAR szwSlash[] = {
'\\', 0 };
1633 static const WCHAR szwStar[] = {
'*',0 };
1658 TRACE(
"%p\n", fodInfos);
1667 if (win2000plus) win98plus =
TRUE;
1669 TRACE(
"Running on 2000+ %d, 98+ %d\n", win2000plus, win98plus);
1695 rectTB.right = rectlook.right + rectTB.right - rectTB.left;
1696 rectTB.bottom = rectlook.top - 1 + rectTB.bottom - rectTB.top;
1697 rectTB.left = rectlook.right;
1698 rectTB.top = rectlook.top-1;
1703 rectTB.left, rectTB.top,
1704 rectTB.right - rectTB.left, rectTB.bottom - rectTB.top,
1709 rectTB.left, rectTB.top,
1710 rectTB.right - rectTB.left, rectTB.bottom - rectTB.top,
1787 handledPath =
FALSE;
1816 TRACE(
"Value in Filename includes path, overriding InitialDir: %s, %s\n",
1858 TRACE(
"Value in InitDir is not an existing path, changed to (nil)\n");
1885 if (!win2000plus && fodInfos->
filename &&
1907 TRACE(
"Value in Filename includes path, overriding initdir: %s, %s\n",
1914 if (!handledPath && win2000plus) {
1930 if (win98plus && !handledPath && fodInfos->
filter && *fodInfos->
filter) {
1941 if(! *lpstrPos)
break;
1942 lpstrPos +=
lstrlenW(lpstrPos) + 1;
1945 if(! *lpstrPos)
break;
1951 lpstrPos +=
lstrlenW(lpstrPos) + 1;
1960 TRACE(
"No initial dir specified, but files of type %s found in current, so using it\n",
1969 if (!handledPath && (win2000plus || win98plus)) {
1987 }
else if (!handledPath) {
2046 if (fodInfos->
DlgInfos.hwndCustomDlg)
2077 RECT rectDlg, rectHelp, rectCancel;
2103 TRACE(
"dir=%s file=%s\n",
2123 IShellBrowser_BrowseObject(fodInfos->
Shell.FOIShellBrowser,pidlItemId, SBSP_ABSOLUTE);
2147 TRACE(
"%p, %p\n",
info->ShellInfos.hwndOwner, pidl);
2149 IShellBrowser_BrowseObject(
info->Shell.FOIShellBrowser, pidl, SBSP_ABSOLUTE);
2271 TRACE(
"canceled\n");
2280 TRACE(
"canceled\n");
2299 UINT nCount, nSizePath;
2320 LPWSTR lpstrTemp = lpstrFileList;
2322 for ( nCount = 0; nCount < nFileCount; nCount++ )
2329 WCHAR lpstrNotFound[100];
2330 WCHAR lpstrMsg[100];
2332 static const WCHAR nl[] = {
'\n',0};
2348 lpstrTemp +=
lstrlenW(lpstrTemp) + 1;
2353 nSizePath =
lstrlenW(lpstrPathSpec) + 1;
2359 FIXME(
"Components have to be separated by blanks\n");
2410 WCHAR mru_list[32], *cur_mru_slot;
2411 BOOL taken[25] = {0};
2412 DWORD mru_list_size =
sizeof(mru_list), key_type = -1,
i;
2413 HKEY hkey_tmp, *hkey;
2422 *stored_path =
'\0';
2426 WARN(
"Unable to create MRU key: %d\n",
ret);
2431 (
LPBYTE)mru_list, &mru_list_size);
2436 WARN(
"Error getting MRUList data: type: %d, ret: %d\n", key_type,
ret);
2441 for(cur_mru_slot = mru_list; *cur_mru_slot; ++cur_mru_slot){
2443 DWORD value_data_size =
sizeof(value_data);
2445 *value_name = *cur_mru_slot;
2448 &key_type, (
LPBYTE)value_data, &value_data_size);
2450 WARN(
"Error getting MRU slot data: type: %d, ret: %d\n", key_type,
ret);
2467 for(cur_mru_slot = mru_list; *cur_mru_slot; ++cur_mru_slot)
2468 taken[*cur_mru_slot -
'a'] =
TRUE;
2469 for(
i = 0;
i < 25; ++
i){
2476 return *cur_mru_slot;
2504 WCHAR *path_ends, *
final;
2518 final[final_len-1] =
'\0';
2521 final_len *
sizeof(
WCHAR));
2533 WCHAR old_mru_list[32], new_mru_list[32];
2534 WCHAR *old_mru_slot, *new_mru_slot = new_mru_list;
2535 DWORD mru_list_size =
sizeof(old_mru_list), key_type;
2538 (
LPBYTE)old_mru_list, &mru_list_size);
2541 new_mru_list[0] =
slot;
2542 new_mru_list[1] =
'\0';
2544 WARN(
"Error getting MRUList data: type: %d, ret: %d\n", key_type,
ret);
2551 *new_mru_slot++ =
slot;
2552 for(old_mru_slot = old_mru_list; *old_mru_slot; ++old_mru_slot){
2553 if(*old_mru_slot !=
slot)
2554 *new_mru_slot++ = *old_mru_slot;
2556 *new_mru_slot =
'\0';
2562 WARN(
"Error saving MRUList data: %d\n",
ret);
2591 static const WCHAR s_subkey[] =
2593 'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
2594 'W',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
2595 'i',
'o',
'n',
'\\',
'E',
'x',
'p',
'l',
'o',
'r',
'e',
'r',
'\\',
'C',
'o',
'm',
'D',
'l',
'g',
2596 '3',
'2',
'\\',
'O',
'p',
'e',
'n',
'S',
'a',
'v',
'e',
'M',
'R',
'U',0
2598 static const WCHAR s_szAst[] = {
'*', 0 };
2619 #define MRU_STRING 0x0000 2620 #define MRU_BINARY 0x0001 2621 #define MRU_CACHEWRITE 0x0002 2627 static CREATEMRULISTW s_pCreateMRUListW =
NULL;
2631 static ADDMRUSTRINGW s_pAddMRUStringW =
NULL;
2635 static FINDMRUSTRINGW s_pFindMRUStringW =
NULL;
2639 static ENUMMRULISTW s_pEnumMRUListW =
NULL;
2643 static FREEMRULIST s_pFreeMRUList =
NULL;
2645 static BOOL FILEDLG_InitMRUList(
void)
2659 if (!s_pCreateMRUListW ||
2660 !s_pAddMRUStringW ||
2661 !s_pFindMRUStringW ||
2674 static const WCHAR s_image_exts[][6] =
2679 {
'j',
'p',
'e',
'g',0 },
2681 {
'j',
'f',
'i',
'f',0 },
2685 {
't',
'i',
'f',
'f',0 }
2710 if (!defext || !*defext || !FILEDLG_InitMRUList())
2719 if (!
result && hOpenSaveMRT)
2725 mi.hKey = hOpenSaveMRT;
2726 mi.lpszSubKey = defext;
2728 hList = (*s_pCreateMRUListW)(&
mi);
2737 (*s_pFreeMRUList)(
hList);
2743 if (stored_path[0] == 0)
2746 if (ExtIsPicture(defext))
2767 if (!defext || !*defext || !FILEDLG_InitMRUList())
2776 if (!
result && hOpenSaveMRT)
2782 mi.hKey = hOpenSaveMRT;
2783 mi.lpszSubKey = defext;
2785 hList = (*s_pCreateMRUListW)(&
mi);
2789 (*s_pFreeMRUList)(
hList);
2795 mi.hKey = hOpenSaveMRT;
2796 mi.lpszSubKey = s_szAst;
2798 hList = (*s_pCreateMRUListW)(&
mi);
2802 (*s_pFreeMRUList)(
hList);
2818 strMsgTitle[0] =
'\0';
2826 int nOpenAction = defAction;
2827 LPWSTR lpszTemp, lpszTemp1;
2829 static const WCHAR szwInvalid[] = {
'/',
':',
'<',
'>',
'|', 0};
2840 lpszTemp1 = lpszTemp = lpstrPathAndFile;
2843 LPSHELLFOLDER lpsfChild;
2854 lpszTemp = lpszTemp +
lstrlenW(lpwstrTemp);
2859 static const WCHAR wszWild[] = {
'*',
'?', 0 };
2867 lpszTemp1 = lpszTemp;
2872 if(
lstrlenW(lpwstrTemp)==2 && lpwstrTemp[1] ==
':' &&
2873 ((lpwstrTemp[0] >=
'a' && lpwstrTemp[0] <=
'z') ||
2874 (lpwstrTemp[0] >=
'A' && lpwstrTemp[0] <=
'Z')))
2884 if((
dwAttributes & (SFGAO_FOLDER | SFGAO_FILESYSANCESTOR)) == (SFGAO_FOLDER | SFGAO_FILESYSANCESTOR))
2886 if(
FAILED(IShellFolder_BindToObject(*ppsf, pidl, 0, &IID_IShellFolder, (
LPVOID*)&lpsfChild)))
2888 ERR(
"bind to failed\n");
2891 IShellFolder_Release(*ppsf);
2909 (lpwstrTemp[
lstrlenW(lpwstrTemp)-1] ==
'\\'))
2951 UINT nFileCount = 0;
2955 LPSHELLFOLDER lpsf =
NULL;
2976 TRACE(
"count=%u len=%u file=%s\n", nFileCount, sizeUsed,
debugstr_w(lpstrFileList));
3023 TRACE(
"end validate sf=%p\n", lpsf);
3046 TRACE(
"ONOPEN_BROWSE\n");
3049 if(
SUCCEEDED(IShellFolder_QueryInterface( lpsf, &IID_IPersistFolder2, (
LPVOID*)&ppf2)))
3052 IPersistFolder2_GetCurFolder(ppf2, &pidlCurrent);
3053 IPersistFolder2_Release(ppf2);
3056 if (
SUCCEEDED(IShellBrowser_BrowseObject(fodInfos->
Shell.FOIShellBrowser, pidlCurrent, SBSP_ABSOLUTE))
3065 if (fodInfos->
Shell.FOIShellView)
3066 IShellView_Refresh(fodInfos->
Shell.FOIShellView);
3099 static const WCHAR szwDot[] = {
'.',0};
3111 strcpyW(filterExt, lpstrFilter);
3119 if (filterSearchIndex)
3121 filterSearchIndex[0] = 0;
3122 pchNext = filterSearchIndex + 1;
3129 while (*
pch ==
'*' || *
pch ==
'.' || *
pch ==
'?')
3145 if (!the_ext && pchFirst && *pchFirst)
3156 the_ext = fodInfos->
defext;
3159 if (the_ext && *the_ext &&
lstrcmpiW(&
ext[1], the_ext) != 0)
3165 lstrcatW(lpstrPathAndFile, szwDot);
3167 lstrcatW(lpstrPathAndFile, the_ext);
3198 static const WCHAR szwDot[] = {
'.',0};
3207 WCHAR* filterSearchIndex;
3214 filterSearchIndex =
wcschr(filterExt,
';');
3215 if (filterSearchIndex)
3217 filterSearchIndex[0] =
'\0';
3223 filterSearchIndex =
wcschr(filterExt,
'.');
3224 if (filterSearchIndex++ && !
wcschr(filterSearchIndex,
'*') && !
wcschr(filterSearchIndex,
'?'))
3226 lstrcpyW(filterExt, filterSearchIndex);
3245 lstrcatW(lpstrPathAndFile, szwDot);
3247 lstrcatW(lpstrPathAndFile, filterExt);
3271 WCHAR lpstrOverwrite[100];
3289 WCHAR lpstrCreate[100];
3349 tempFileA,
sizeof(tempFileA),
NULL,
NULL);
3381 FILEDLG95_MRU_save_ext(lpstrPathAndFile);
3407 if(lpsf) IShellFolder_Release(lpsf);
3458 if(
SUCCEEDED(IShellView_GetItemObject(fodInfos->
Shell.FOIShellView,
3463 CMINVOKECOMMANDINFO ci;
3464 ZeroMemory(&ci,
sizeof(CMINVOKECOMMANDINFO));
3465 ci.cbSize =
sizeof(CMINVOKECOMMANDINFO);
3469 IContextMenu_InvokeCommand(pcm, &ci);
3470 IContextMenu_Release(pcm);
3488 if(
SUCCEEDED(IShellBrowser_BrowseObject(fodInfos->
Shell.FOIShellBrowser,
3512 if (fodInfos->
Shell.FOIShellView)
3514 IShellView_DestroyViewWindow(fodInfos->
Shell.FOIShellView);
3515 IShellView_Release(fodInfos->
Shell.FOIShellView);
3517 if (fodInfos->
Shell.FOIShellFolder)
3518 IShellFolder_Release(fodInfos->
Shell.FOIShellFolder);
3519 IShellBrowser_Release(fodInfos->
Shell.FOIShellBrowser);
3520 if (fodInfos->
Shell.FOIDataObject)
3521 IDataObject_Release(fodInfos->
Shell.FOIDataObject);
3549 if (! *lpstrPos)
return E_FAIL;
3573 if(! *lpstrPos)
break;
3574 lpstrDisplay = lpstrPos;
3575 lpstrPos +=
lstrlenW(lpstrPos) + 1;
3584 lpstrPos +=
lstrlenW(lpstrPos) + 1;
3590 if (!*lpstrExt)
break;
3679 if (fodInfos->
Shell.FOIShellView)
3680 IShellView_Refresh(fodInfos->
Shell.FOIShellView);
3700 for(
i=0;
i<iCount;
i++)
3727 for(iPos = iCount-1;iPos>=0;iPos--)
3748 static const WCHAR wszRootedAtDesktop[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
3749 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
'W',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
3750 'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',
'\\',
3751 'E',
'x',
'p',
'l',
'o',
'r',
'e',
'r',
'\\',
'D',
'e',
's',
'k',
't',
'o',
'p',
'\\',
3752 'N',
'a',
'm',
'e',
'S',
'p',
'a',
'c',
'e',
'\\',
'{',
'9',
'D',
'2',
'0',
'A',
'A',
'E',
'8',
3753 '-',
'0',
'6',
'2',
'5',
'-',
'4',
'4',
'B',
'0',
'-',
'9',
'C',
'A',
'7',
'-',
3754 '7',
'1',
'8',
'8',
'9',
'C',
'2',
'2',
'5',
'4',
'D',
'9',
'}',0 };
3767 LPITEMIDLIST pidlDrives, pidlTmp, pidlTmp1, pidlAbsTmp;
3770 LookInInfos *liInfos = heap_alloc_zero(
sizeof(*liInfos));
3772 TRACE(
"%p\n", hwndCombo);
3802 if(
SUCCEEDED(IShellFolder_EnumObjects(psfRoot, hwndCombo, SHCONTF_FOLDERS, &lpeRoot)))
3804 while (
S_OK == IEnumIDList_Next(lpeRoot, 1, &pidlTmp,
NULL))
3814 if(
SUCCEEDED(IShellFolder_BindToObject(psfRoot, pidlTmp,
NULL, &IID_IShellFolder, (
LPVOID*)&psfDrives)))
3817 if(
SUCCEEDED(IShellFolder_EnumObjects(psfDrives, hwndCombo,SHCONTF_FOLDERS, &lpeDrives)))
3819 while (
S_OK == IEnumIDList_Next(lpeDrives, 1, &pidlTmp1,
NULL))
3821 pidlAbsTmp =
ILCombine(pidlTmp, pidlTmp1);
3826 IEnumIDList_Release(lpeDrives);
3828 IShellFolder_Release(psfDrives);
3835 IEnumIDList_Release(lpeRoot);
3837 IShellFolder_Release(psfRoot);
3861 UINT icon_width, icon_height;
3865 if(pDIStruct->
itemID == -1)
3883 0, &sfi,
sizeof (sfi), shgfi_flags );
3900 if(pDIStruct->
itemState & ODS_COMBOBOXEDIT)
3908 rectIcon.
left = pDIStruct->
rcItem.
left + 1 + icon_width/2 * iIndentation;
3945 TRACE(
"%p\n", fodInfos);
3963 if(
SUCCEEDED(IShellBrowser_BrowseObject(fodInfos->
Shell.FOIShellBrowser,
3991 TRACE(
"%p, %p, %d\n",
hwnd, pidl, iInsertId);
3999 tmpFolder = heap_alloc_zero(
sizeof(*tmpFolder));
4004 while ((pidlNext =
ILGetNext(pidlNext)))
4014 sfi.
dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM;
4063 if (pidl == pidlParent)
4110 if(iRemovedItem < iItemPos)
4164 TRACE(
"0x%08lx 0x%x\n",searchArg, iSearchMethod);
4200 for(iPos = iCount-1;iPos>=0;iPos--)
4221 static CLIPFORMAT cfFormat;
4222 FORMATETC formatetc;
4225 formatetc.cfFormat = cfFormat;
4227 formatetc.dwAspect = DVASPECT_CONTENT;
4228 formatetc.lindex = -1;
4229 formatetc.tymed = TYMED_HGLOBAL;
4242 LPWSTR lpstrAllFiles, lpstrTmp;
4243 UINT nFiles = 0, nFileToOpen, nFileSelected, nAllFilesLength = 0, nThisFileLength, nAllFilesMaxLength;
4250 if (
FAILED(IDataObject_GetData(fodInfos->
Shell.FOIDataObject, &formatetc, &medium)))
4254 nFileSelected = cida->
cidl;
4258 lpstrAllFiles = heap_alloc_zero(nAllFilesMaxLength *
sizeof(
WCHAR));
4263 for (nFileToOpen = 0; nFileToOpen < nFileSelected; nFileToOpen++)
4270 if (nAllFilesLength +
MAX_PATH + 3 > nAllFilesMaxLength)
4272 nAllFilesMaxLength *= 2;
4276 lpstrAllFiles = lpstrTmp;
4279 lpstrAllFiles[nAllFilesLength++] =
'"';
4280 GetName(fodInfos->
Shell.FOIShellFolder, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, lpstrAllFiles + nAllFilesLength);
4281 nThisFileLength =
lstrlenW(lpstrAllFiles + nAllFilesLength);
4282 nAllFilesLength += nThisFileLength;
4283 lpstrAllFiles[nAllFilesLength++] =
'"';
4284 lpstrAllFiles[nAllFilesLength++] =
' ';
4292 lpstrTmp = lpstrAllFiles;
4296 lpstrTmp[nThisFileLength] = 0;
4334 FIXME(
"unknown type %x!\n",
src->uType);
4349 UINT nFileCount = 0;
4378 if(medium.pUnkForRelease)
4380 IUnknown_Release(medium.pUnkForRelease);
4403 TRACE(
"sv=%p index=%u\n", doSelected, nPidlIndex);
4409 if(
SUCCEEDED(IDataObject_GetData(doSelected,&formatetc,&medium)))
4412 if(nPidlIndex <= cida->cidl)
4433 TRACE(
"sv=%p\n", doSelected);
4435 if (!doSelected)
return 0;
4438 if(
SUCCEEDED(IDataObject_GetData(doSelected,&formatetc,&medium)))
4441 retVal = cida->
cidl;
4467 TRACE(
"sf=%p pidl=%p\n", lpsf, pidl);
4473 IShellFolder_Release(lpsf);
4495 TRACE(
"%p\n", pidlAbs);
4500 if(pidlAbs && pidlAbs->mkid.cb)
4502 if(
SUCCEEDED(IShellFolder_BindToObject(psfParent, pidlAbs,
NULL, &IID_IShellFolder, (
LPVOID*)&psf)))
4504 IShellFolder_Release(psfParent);