21 #define WIN32_NO_STATUS 31 #include <wine/unicode.h> 39 #define FM_SEPARATOR (LPCWSTR)1 42 HMENU hMenuPopup,
int nItemHeight);
70 #define CCH_MAXITEMTEXT 256 89 ERR(
"menudata corrupt: %p %u\n", menudata,
MenuInfo.cbSize);
131 ULONG ulItemAttr = SFGAO_FOLDER;
132 UINT uID, uEnumFlags;
136 int NumberOfItems = 0, iIcon;
152 ERR(
"menudata corrupt: %p %u\n", menudata,
MenuInfo.cbSize);
159 pidl = (pAlternatePidl? pAlternatePidl: menudata->
pidl);
172 if (
SUCCEEDED(IShellFolder_BindToObject(lpsf, pidl,0,&IID_IShellFolder,(
LPVOID *)&lpsf2)))
176 if (
SUCCEEDED (IShellFolder_EnumObjects(lpsf2, 0, uEnumFlags, &lpe )))
182 while ((!
bAbortInit) && (
S_OK == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched)))
189 if ( SFGAO_FOLDER & ulItemAttr)
198 lpFmMi->
uEnumFlags = SHCONTF_FOLDERS | SHCONTF_NONFOLDERS;
218 TRACE(
"enter callback\n");
219 lpfnCallback ( pidl, pidlTemp);
220 TRACE(
"leave callback\n");
225 IEnumIDList_Release (lpe);
227 IShellFolder_Release(lpsf2);
229 IShellFolder_Release(lpsf);
234 static const WCHAR szEmpty[] = {
'(',
'e',
'm',
'p',
't',
'y',
')',0 };
242 return NumberOfItems;
263 TRACE(
"0x%08x 0x%08x %p 0x%08x 0x%08x hMenu=%p\n",
264 crBorderColor, nBorderWidth, hBorderBmp, nSelHeight,
uFlags, hMenu);
319 TRACE(
"%p %s 0x%08x 0x%08x %p 0x%08x\n",
321 uID, icon, hMenuPopup, nItemHeight);
334 myItem->
hMenu = hMenu;
369 ERR(
"menudata corrupt: %p %u\n", menudata,
MenuInfo.cbSize);
392 if (!lpText)
return FALSE;
400 if (!lpszText)
return FALSE;
423 TRACE(
"%p 0x%08x %p 0x%08x 0x%08x %p\n",
424 hmenu, uID, pidl,
uFlags, uEnumFlags, lpfnCallback);
447 TRACE(
"%p 0x%08x %p 0x%08x %p\n",
448 hmenu, uID, pidl, uEnumFlags, lpfnCallback);
472 FIXME(
"%p %p\n",hMenu, pidl);
495 TRACE(
"%p %p 0x%08x\n",
hmenu, pidl,bAddSeparator);
514 TRACE(
"%p 0x%08x 0x%08x %p 0x%08x 0x%08x %p\n",
515 hmenu, uReserved, uID, pidl,
uFlags, uEnumFlags, lpfnCallback);
533 TRACE(
"%p 0x%08x 0x%x 0x%x %p %p\n",
546 FIXME(
"0x%08x %p %p\n",uReserved, ppidlFolder, ppidlItem);
550 #define FM_ICON_SIZE 16 554 #define FM_LEFTBORDER 2 555 #define FM_RIGHTBORDER 8 709 TRACE(
"%p 0x%08x\n", hMenu, uID);
732 TRACE(
"%p 0x%08x\n", hMenu, uPos);
755 TRACE(
"%p 0x%08x\n", hMenu, uID);
764 TRACE(
"%p\n", hMenu);
789 FIXME(
"%p 0x%08x\n", hMenu, uPos);
826 FIXME(
"hmenu=%p hwnd=%p 0x%08x 0x%08x stub\n",
860 BOOL bAlreadySeparated;
863 UINT uTemp, uIDMax = uIDAdjust;
865 TRACE(
"hmenu1=%p hmenu2=%p 0x%04x 0x%04x 0x%04x 0x%04x\n",
866 hmDst, hmSrc, uInsert, uIDAdjust, uIDAdjustMax,
uFlags);
868 if (!hmDst || !hmSrc)
875 if (uInsert >= (
UINT)nItem)
877 uInsert = (
UINT)nItem;
878 bAlreadySeparated =
TRUE;
889 bAlreadySeparated =
TRUE;
915 if (bAlreadySeparated)
918 bAlreadySeparated =
TRUE;
924 miiSrc.
wID += uIDAdjust;
926 if (miiSrc.
wID > uIDAdjustMax)
929 if (uIDMax <= miiSrc.
wID)
930 uIDMax = miiSrc.
wID + 1;
940 if (!miiSrc.
hSubMenu)
return(uIDMax);
947 bAlreadySeparated =
FALSE;
951 miiSrc.
wID += uIDAdjust;
953 if (miiSrc.
wID > uIDAdjustMax)
956 if (uIDMax <= miiSrc.
wID)
957 uIDMax = miiSrc.
wID + 1;
959 bAlreadySeparated =
FALSE;
974 if (bAlreadySeparated)
983 if (bAlreadySeparated)
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
struct tagMENUINFO MENUINFO
GLubyte GLubyte GLubyte GLubyte w
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
LPFNFMCALLBACK lpfnCallback
BOOL WINAPI InsertMenuW(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define FM_DEFAULT_HEIGHT
HDC WINAPI GetDC(_In_opt_ HWND)
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
GLint GLint GLint GLint GLint x
BOOL WINAPI ImageList_Draw(HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, UINT fStyle)
static __inline BOOL SHELL_OsIsUnicode(void)
DWORD WINAPI GetSysColor(_In_ int)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
void(CALLBACK * LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile)
BOOL ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type)
#define COLOR_HIGHLIGHTTEXT
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
BOOL WINAPI InsertMenuA(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCSTR)
static const WCHAR szEmpty[]
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
const char * wine_dbgstr_rect(const RECT *rect)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI Shell_GetImageLists(HIMAGELIST *lpBigList, HIMAGELIST *lpSmallList)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
BOOL WINAPI SetMenuInfo(_In_ HMENU, _In_ LPCMENUINFO)
void shell(int argc, const char *argv[])
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
BOOL WINAPI GetMenuInfo(_In_ HMENU, _Inout_ LPMENUINFO)
void pdump(LPCITEMIDLIST pidl)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
GLint GLint GLint GLint GLint GLint y
#define MultiByteToWideChar
BOOL WINAPI GetMenuItemRect(_In_opt_ HWND, _In_ HMENU, _In_ UINT, _Out_ LPRECT)
HMENU WINAPI CreatePopupMenu(void)
void WINAPI SHFree(LPVOID pv)
#define MM_SUBMENUSHAVEIDS
static const WCHAR szName[]
BOOL PidlToSicIndex(IShellFolder *sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int *pIndex)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
LPVOID WINAPI SHAlloc(SIZE_T len)
struct tagMENUITEMINFOW MENUITEMINFOW
#define HeapFree(x, y, z)
BOOL WINAPI GetTextExtentPoint32W(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE psizl)