10#include <commoncontrols.h>
11#include <../browseui.h>
20#define UNIMPLEMENTED DbgPrint("%s is UNIMPLEMENTED!\n", __FUNCTION__)
39 DWORD SearchHiddenValue = 0;
48 ERR(
"RegQueryKey for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SearchHidden\" returned error(s).\n");
49 SearchHiddenValue = 1;
53 TRACE(
"SearchHidden is '%d'.\n", SearchHiddenValue);
58 ERR(
"RegQueryKey for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SearchHidden\" Failed.\n");
63 ERR(
"RegOpenKey for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\" Failed.\n");
65 if (SearchHiddenValue != 0)
93 AtlAdvise(pShellBrowser,
static_cast<IDispatch *
>(
this), DIID_DWebBrowserEvents, &dwAdviseCookie);
116 ppShellBrowser = &pShellBrowser;
117 if (!*ppShellBrowser)
125 hr = (*ppShellBrowser)->QueryActiveShellView(&pShellView);
136 ppShellFolder = &pShellFolder;
145 if (
clsid != CLSID_FindFolder)
150 hr = pShellView->GetWindow(pHwnd);
180 if ((
len > 0) && !
wcspbrk(pSearchStart->szFileName,
L"*?"))
182 endchar = pSearchStart->szFileName[
len - 1];
183 startchar = pSearchStart->szFileName[0];
186 memmove(&pSearchStart->szFileName[1], &pSearchStart->szFileName[0],
189 pSearchStart->szFileName[0] =
L'*';
198 TRACE(
"Searched szFileName is '%S'.\n", pSearchStart->szFileName);
210 const WCHAR shellGuidPrefix[] =
L"shell:::";
211 memcpy(szShellGuid, shellGuidPrefix,
sizeof(shellGuidPrefix));
222 hr = pShellBrowser->BrowseObject(findFolderPidl, 0);
253 if (iSelectedIndex !=
CB_ERR)
258 item.iItem = iSelectedIndex;
259 item.pszText = szItemText;
295 iWidth - iPadding * 2,
325 TRACE(
"CloseDW called\n");
351 if (pdbi->
dwMask & DBIM_MINSIZE)
357 if (pdbi->
dwMask & DBIM_MAXSIZE)
362 if (pdbi->
dwMask & DBIM_INTEGRAL)
367 if (pdbi->
dwMask & DBIM_ACTUAL)
373 if (pdbi->
dwMask & DBIM_TITLE)
379 if (pdbi->
dwMask & DBIM_MODEFLAGS)
381 pdbi->
dwModeFlags = DBIMF_NORMAL | DBIMF_VARIABLEHEIGHT;
384 if (pdbi->
dwMask & DBIM_BKCOLOR)
386 pdbi->
dwMask &= ~DBIM_BKCOLOR;
401 TRACE(
"SetSite called \n");
412 ERR(
"Could not get parent's window ! Status: %08lx\n",
hr);
482 *pClassID = CLSID_FileSearchBand;
550 hr =
AtlAdvise(pShellFolder,
static_cast<IDispatch *
>(
this), DIID_DSearchCommandEvents, &fAdviseCookie);
559 switch (dispIdMember)
571 pDispatch->Invoke(dispIdMember,
riid, lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
576 hResult = pShellService->SetOwner(
NULL);
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define STDMETHODCALLTYPE
#define RegCloseKey(hKey)
HRESULT CAddressEditBox_CreateInstance(REFIID riid, void **ppv)
HWND Create(HWND hWndParent, LPARAM dwInitParam=0)
HWND SetParent(HWND hWndNewParent)
UINT IsDlgButtonChecked(int nIDButton) const
BOOL CheckDlgButton(int nIDButton, UINT nCheck)
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
HWND GetDlgItem(_In_ int nID) const
BOOL ScreenToClient(LPPOINT lpPoint) const
HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
BOOL GetWindowRect(LPRECT lpRect) const
BOOL ShowWindow(int nCmdShow)
BOOL IsChild(const HWND hWnd) const
STDMETHOD() HasFocusIO() override
STDMETHOD() CloseDW(DWORD dwReserved) override
STDMETHOD() ContextSensitiveHelp(BOOL fEnterMode) override
STDMETHOD() Save(IStream *pStm, BOOL fClearDirty) override
CComPtr< IUnknown > m_pSite
STDMETHOD() GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() IsDirty() override
LRESULT OnSearchButtonClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
STDMETHOD() GetClassID(CLSID *pClassID) override
STDMETHOD() GetWindow(HWND *lphwnd) override
HRESULT GetSearchResultsFolder(IShellBrowser **ppShellBrowser, HWND *pHwnd, IShellFolder **ppShellFolder)
STDMETHOD() Load(IStream *pStm) override
LRESULT OnStopButtonClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
STDMETHOD() ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
BOOL GetAddressEditBoxPath(WCHAR *szPath)
STDMETHOD() SetSite(IUnknown *pUnkSite) override
HRESULT TrySubscribeToSearchEvents()
STDMETHOD() GetSizeMax(ULARGE_INTEGER *pcbSize) override
STDMETHOD() GetSite(REFIID riid, void **ppvSite) override
STDMETHOD() Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override
STDMETHOD() ShowDW(BOOL fShow) override
STDMETHOD() GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override
LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() GetTypeInfoCount(UINT *pctinfo) override
void SetSearchInProgress(BOOL bInProgress)
STDMETHOD() TranslateAcceleratorIO(LPMSG lpMsg) override
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override
STDMETHOD() UIActivateIO(BOOL fActivate, LPMSG lpMsg) override
CComPtr< IAddressEditBox > m_AddressEditBox
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
#define IDC_SEARCH_BUTTON
#define IDC_SEARCH_COMBOBOX
#define IDC_SEARCH_HIDDEN
#define IDS_SEARCHINVALID
#define IDC_SEARCH_STOP_BUTTON
#define IDC_SEARCH_FILENAME
#define FAILED_UNEXPECTEDLY(hr)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID *clsid)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
#define DISPID_SEARCHABORT
#define DISPID_SEARCHCOMPLETE
GLenum const GLfloat * params
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
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static VARIANTARG static DISPID
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define FILE_ATTRIBUTE_DIRECTORY
HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
#define CBEM_SETEXTENDEDSTYLE
#define CBEM_SETIMAGELIST
#define CBES_EX_NOSIZELIMIT
#define CBES_EX_CASESENSITIVE
#define CBEM_GETEDITCONTROL
_Check_return_ _CRTIMP _CONST_RETURN wchar_t *__cdecl wcspbrk(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_Control)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
#define SID_SShellBrowser
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchLengthW(STRSAFE_LPCWSTR psz, size_t cchMax, size_t *pcchLength)
#define INVALID_FILE_ATTRIBUTES
#define DISPID_NAVIGATECOMPLETE2
#define DISPID_DOCUMENTCOMPLETE
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
DWORD WINAPI GetLastError(void)
_In_ DWORD _Out_ _In_ WORD wFlags
#define HRESULT_FROM_WIN32(x)
#define HKEY_CURRENT_USER
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define SWP_NOOWNERZORDER
#define MAKEINTRESOURCEW(i)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define IID_PPV_ARG(Itype, ppType)