ReactOS 0.4.16-dev-1020-gf135cab
CSearchBar Class Reference

#include <appview.h>

Inheritance diagram for CSearchBar:
Collaboration diagram for CSearchBar:

Public Types

enum  { IDD = IDD_SEARCH_DLG }
 
- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IObjectWithSite
typedef IObjectWithSiteLPOBJECTWITHSITE
 
- Public Types inherited from IPersistStream
typedef IPersistStreamLPPERSISTSTREAM
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Public Types inherited from IDispatch
typedef IDispatchLPDISPATCH
 
- Public Types inherited from ATL::CWindowImplRoot< TBase >
enum  { WINSTATE_DESTROYED = 0x00000001 }
 

Public Member Functions

 CSearchBar ()
 
VOID SetText (LPCWSTR lpszText)
 
HWND Create (HWND hwndParent)
 
 CSearchBar ()
 
virtual ~CSearchBar ()
 
STDMETHOD() GetWindow (HWND *lphwnd) override
 
STDMETHOD() ContextSensitiveHelp (BOOL fEnterMode) override
 
STDMETHOD() CloseDW (DWORD dwReserved) override
 
STDMETHOD() ResizeBorderDW (const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
 
STDMETHOD() ShowDW (BOOL fShow) override
 
STDMETHOD() GetBandInfo (DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override
 
STDMETHOD() SetSite (IUnknown *pUnkSite) override
 
STDMETHOD() GetSite (REFIID riid, void **ppvSite) override
 
STDMETHOD() UIActivateIO (BOOL fActivate, LPMSG lpMsg) override
 
STDMETHOD() HasFocusIO () override
 
STDMETHOD() TranslateAcceleratorIO (LPMSG lpMsg) override
 
STDMETHOD() GetClassID (CLSID *pClassID) override
 
STDMETHOD() IsDirty () override
 
STDMETHOD() Load (IStream *pStm) override
 
STDMETHOD() Save (IStream *pStm, BOOL fClearDirty) override
 
STDMETHOD() GetSizeMax (ULARGE_INTEGER *pcbSize) override
 
STDMETHOD() GetTypeInfoCount (UINT *pctinfo) override
 
STDMETHOD() GetTypeInfo (UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override
 
STDMETHOD() GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override
 
STDMETHOD() Invoke (DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override
 
- Public Member Functions inherited from ATL::CWindow
 CWindow (HWND hWnd=NULL)
 
 operator HWND () const
 
UINT ArrangeIconicWindows ()
 
void Attach (HWND hWndNew)
 
HDC BeginPaint (LPPAINTSTRUCT lpPaint)
 
BOOL BringWindowToTop ()
 
BOOL CenterWindow (HWND hWndCenter=NULL)
 
BOOL ChangeClipboardChain (HWND hWndNewNext)
 
BOOL CheckDlgButton (int nIDButton, UINT nCheck)
 
BOOL CheckRadioButton (int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
 
HWND ChildWindowFromPoint (POINT point) const
 
HWND ChildWindowFromPointEx (POINT point, UINT uFlags) const
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (LPRECT lpRect) const
 
HWND Create (LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
BOOL CreateCaret (HBITMAP pBitmap)
 
BOOL CreateGrayCaret (int nWidth, int nHeight)
 
BOOL CreateSolidCaret (int nWidth, int nHeight)
 
HDWP DeferWindowPos (HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
 
BOOL DestroyWindow ()
 
HWND Detach ()
 
int DlgDirList (LPTSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT nFileType)
 
int DlgDirListComboBox (LPTSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT nFileType)
 
BOOL DlgDirSelect (LPTSTR lpString, int nCount, int nIDListBox)
 
BOOL DlgDirSelectComboBox (LPTSTR lpString, int nCount, int nIDComboBox)
 
void DragAcceptFiles (BOOL bAccept=TRUE)
 
BOOL DrawMenuBar ()
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL EnableWindow (BOOL bEnable=TRUE)
 
void EndPaint (LPPAINTSTRUCT lpPaint)
 
BOOL FlashWindow (BOOL bInvert)
 
BOOL GetClientRect (LPRECT lpRect) const
 
HDC GetDC ()
 
HDC GetDCEx (HRGN hRgnClip, DWORD flags)
 
HWND GetDescendantWindow (int nID) const
 
HRESULT GetDlgControl (int nID, REFIID iid, void **ppCtrl)
 
int GetDlgCtrlID () const
 
HRESULT GetDlgHost (int nID, REFIID iid, void **ppHost)
 
HWND GetDlgItem (_In_ int nID) const
 
UINT GetDlgItemInt (_In_ int nID, _Out_opt_ BOOL *lpTrans=NULL, _In_ BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
 
BOOL GetDlgItemText (_In_ int nID, _Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
DWORD GetHotKey () const
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
HWND GetLastActivePopup () const
 
HMENU GetMenu () const
 
HWND GetNextDlgGroupItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
HWND GetNextDlgTabItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
CWindow GetParent () const
 
BOOL GetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo)
 
BOOL GetScrollPos (int nBar)
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
DWORD GetStyle () const
 
HMENU GetSystemMenu (BOOL bRevert)
 
HWND GetTopLevelParent () const
 
HWND GetTopLevelWindow () const
 
HWND GetTopWindow () const
 
BOOL GetUpdateRect (LPRECT lpRect, BOOL bErase=FALSE)
 
int GetUpdateRgn (HRGN hRgn, BOOL bErase=FALSE)
 
HWND GetWindow (UINT nCmd) const
 
DWORD GetWindowContextHelpId () const
 
HDC GetWindowDC ()
 
LONG GetWindowLong (int nIndex) const
 
LONG_PTR GetWindowLongPtr (int nIndex) const
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
DWORD GetWindowProcessID ()
 
BOOL GetWindowRect (LPRECT lpRect) const
 
int GetWindowRgn (HRGN hRgn)
 
int GetWindowText (_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
 
BOOL GetWindowText (_Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
int GetWindowTextLength () const
 
DWORD GetWindowThreadID ()
 
WORD GetWindowWord (int nIndex) const
 
void GotoDlgCtrl (HWND hWndCtrl) const
 
BOOL HideCaret ()
 
BOOL HiliteMenuItem (HMENU hMenu, UINT uHiliteItem, UINT uHilite)
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsChild (const HWND hWnd) const
 
BOOL IsDialogMessage (LPMSG lpMsg)
 
UINT IsDlgButtonChecked (int nIDButton) const
 
BOOL IsIconic () const
 
BOOL IsParentDialog ()
 
BOOL IsWindow () const
 
BOOL IsWindowEnabled () const
 
BOOL IsWindowVisible () const
 
BOOL IsWindowUnicode ()
 
BOOL IsZoomed () const
 
BOOL KillTimer (UINT_PTR nIDEvent)
 
BOOL LockWindowUpdate (BOOL bLock=TRUE)
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
 
int MapWindowPoints (HWND hWndTo, LPRECT lpRect) const
 
int MessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
 
void NextDlgCtrl () const
 
BOOL OpenClipboard ()
 
BOOL PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void PrevDlgCtrl () const
 
void Print (HDC hDC, DWORD dwFlags) const
 
void PrintClient (HDC hDC, DWORD dwFlags) const
 
BOOL RedrawWindow (LPCRECT lpRectUpdate=NULL, HRGN hRgnUpdate=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
int ReleaseDC (HDC hDC)
 
BOOL ResizeClient (int nWidth, int nHeight, BOOL bRedraw=FALSE)
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScrollWindow (int xAmount, int yAmount, LPCRECT lpRect=NULL, LPCRECT lpClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, HRGN hRgnUpdate, LPRECT lpRectUpdate, UINT flags)
 
LRESULT SendDlgItemMessage (int nID, UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void SendMessageToDescendants (UINT message, WPARAM wParam=0, LPARAM lParam=0, BOOL bDeep=TRUE)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
HWND SetActiveWindow ()
 
HWND SetCapture ()
 
HWND SetClipboardViewer ()
 
int SetDlgCtrlID (int nID)
 
BOOL SetDlgItemInt (int nID, UINT nValue, BOOL bSigned=TRUE)
 
BOOL SetDlgItemText (int nID, LPCTSTR lpszString)
 
HWND SetFocus ()
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
int SetHotKey (WORD wVirtualKeyCode, WORD wModifiers)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
BOOL SetMenu (HMENU hMenu)
 
HWND SetParent (HWND hWndNewParent)
 
void SetRedraw (BOOL bRedraw=TRUE)
 
int SetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo, BOOL bRedraw=TRUE)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
 
BOOL SetWindowContextHelpId (DWORD dwContextHelpId)
 
LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong)
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetWindowText (LPCTSTR lpszString)
 
WORD SetWindowWord (int nIndex, WORD wNewWord)
 
BOOL ShowCaret ()
 
BOOL ShowOwnedPopups (BOOL bShow=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL ShowWindow (int nCmdShow)
 
BOOL ShowWindowAsync (int nCmdShow)
 
BOOL UpdateWindow ()
 
BOOL ValidateRect (LPCRECT lpRect)
 
BOOL ValidateRgn (HRGN hRgn)
 
BOOL WinHelp (LPCTSTR lpszHelp, UINT nCmd=HELP_CONTEXT, DWORD dwData=0)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
HRESULT GetBandInfo ([in] DWORD dwBandID, [in] DWORD dwViewMode, [in, out] DESKBANDINFO *pdbi)
 
- Public Member Functions inherited from IDockingWindow
HRESULT ShowDW ([in] BOOL fShow)
 
HRESULT CloseDW ([in] DWORD dwReserved)
 
HRESULT ResizeBorderDW ([in] LPCRECT prcBorder, [in] IUnknown *punkToolbarSite, [in] BOOL fReserved)
 
HRESULT GetWindow ([out] HWND *phwnd)
 
HRESULT ContextSensitiveHelp ([in] BOOL fEnterMode)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IObjectWithSite
HRESULT SetSite ([in] IUnknown *pUnkSite)
 
HRESULT GetSite ([in] REFIID riid, [out, iid_is(riid)] PVOID *ppvSite)
 
HRESULT IsDirty ()
 
HRESULT Load ([in, unique] IStream *pStm)
 
HRESULT Save ([in, unique] IStream *pStm, [in] BOOL fClearDirty)
 
HRESULT GetSizeMax ([out] ULARGE_INTEGER *pcbSize)
 
HRESULT GetClassID ([out] CLSID *pClassID)
 
- Public Member Functions inherited from IDispatch
HRESULT GetTypeInfoCount ([out] UINT *pctinfo)
 
HRESULT GetTypeInfo ([in] UINT iTInfo, [in] LCID lcid, [out] ITypeInfo **ppTInfo)
 
HRESULT GetIDsOfNames ([in] REFIID riid, [in, size_is(cNames)] LPOLESTR *rgszNames, [in] UINT cNames, [in] LCID lcid, [out, size_is(cNames)] DISPID *rgDispId)
 
HRESULT Invoke ([in] DISPID dispIdMember, [in] REFIID riid, [in] LCID lcid, [in] WORD wFlags, [in, out] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *puArgErr)
 
HRESULT RemoteInvoke ([in] DISPID dispIdMember, [in] REFIID riid, [in] LCID lcid, [in] DWORD dwFlags, [in] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *pArgErr, [in] UINT cVarRef, [in, size_is(cVarRef)] UINT *rgVarRefIdx, [in, out, size_is(cVarRef)] VARIANTARG *rgVarRef)
 
- Public Member Functions inherited from ATL::CDialogImpl< CSearchBar >
HWND Create (HWND hWndParent, LPARAM dwInitParam=0)
 
INT_PTR DoModal (HWND hWndParent=::GetActiveWindow(), LPARAM dwInitParam=0)
 
BOOL EndDialog (_In_ int nRetCode)
 
BOOL DestroyWindow ()
 
- Public Member Functions inherited from ATL::CDialogImplBaseT< TBase >
virtual ~CDialogImplBaseT ()
 
virtual DLGPROC GetDialogProc ()
 
virtual void OnFinalMessage (HWND)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< TBase >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 

Public Attributes

const INT m_Width
 
const INT m_Height
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Public Attributes inherited from IDispatch
const DISPID DISPID_UNKNOWN = -1
 
const DISPID DISPID_VALUE = 0
 
const DISPID DISPID_PROPERTYPUT = -3
 
const DISPID DISPID_NEWENUM = -4
 
const DISPID DISPID_EVALUATE = -5
 
const DISPID DISPID_CONSTRUCTOR = -6
 
const DISPID DISPID_DESTRUCTOR = -7
 
const DISPID DISPID_COLLECT = -8
 
- Public Attributes inherited from ATL::CWindowImplRoot< TBase >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 

Private Member Functions

HRESULT GetSearchResultsFolder (IShellBrowser **ppShellBrowser, HWND *pHwnd, IShellFolder **ppShellFolder)
 
LOCATIONITEMGetAddressEditBoxLocations (WCHAR *szPath)
 
void SetSearchInProgress (BOOL bInProgress)
 
HRESULT TrySubscribeToSearchEvents ()
 
void TrySetFocus (UINT Source)
 
LRESULT OnInitDialog (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetFocus (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSearchButtonClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnStopButtonClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnLocationEditChange (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 

Private Attributes

CComPtr< IUnknownm_pSite
 
CComPtr< IAddressEditBox > m_AddressEditBox
 
INT_PTR m_RealItemIndex
 
BOOL m_bVisible
 

Additional Inherited Members

- Static Public Member Functions inherited from ATL::CWindow
static LPCTSTR GetWndClassName ()
 
static LRESULT SendMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CComCoClass< CSearchBar, &CLSID_FileSearchBand >
static LPCTSTR WINAPI GetObjectDescription ()
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Static Public Member Functions inherited from ATL::CDialogImplBaseT< TBase >
static INT_PTR CALLBACK StartDialogProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK DialogProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 305 of file appview.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 84 of file CSearchBar.h.

#define IDD_SEARCH_DLG
Definition: resource.h:166

Constructor & Destructor Documentation

◆ CSearchBar() [1/2]

CSearchBar::CSearchBar ( )

Definition at line 230 of file appview.cpp.

230 : m_Width(180), m_Height(22)
231{
232}
const INT m_Height
Definition: appview.h:309
const INT m_Width
Definition: appview.h:308

◆ CSearchBar() [2/2]

CSearchBar::CSearchBar ( )

◆ ~CSearchBar()

CSearchBar::~CSearchBar ( )
virtual

Definition at line 181 of file CSearchBar.cpp.

182{
183}

Member Function Documentation

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CSearchBar::CloseDW ( DWORD  dwReserved)
override

Implements IDockingWindow.

Definition at line 537 of file CSearchBar.cpp.

538{
539 // We do nothing, we don't have anything to save yet
540 TRACE("CloseDW called\n");
541 return S_OK;
542}
#define S_OK
Definition: intsafe.h:52
#define TRACE(s)
Definition: solgame.cpp:4

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CSearchBar::ContextSensitiveHelp ( BOOL  fEnterMode)
override

Implements IOleWindow.

Definition at line 529 of file CSearchBar.cpp.

530{
532 return E_NOTIMPL;
533}
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Create()

HWND CSearchBar::Create ( HWND  hwndParent)

Definition at line 241 of file appview.cpp.

242{
243 CStringW szBuf;
246 hwndParent, (HMENU)NULL, hInst, 0);
247
249 szBuf.LoadStringW(IDS_SEARCH_TEXT);
250 SetWindowTextW(szBuf);
251 return m_hWnd;
252}
#define IDS_SEARCH_TEXT
Definition: resource.h:102
HWND m_hWnd
Definition: atlwin.h:273
static HWND hwndParent
Definition: cryptui.c:300
#define NULL
Definition: types.h:112
HINSTANCE hInst
Definition: dxdiag.c:13
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define L(x)
Definition: ntvdm.h:50
#define WS_CHILD
Definition: pedump.c:617
#define ES_AUTOHSCROLL
Definition: pedump.c:672
#define WS_VISIBLE
Definition: pedump.c:620
#define ES_LEFT
Definition: pedump.c:664
UINT_PTR WPARAM
Definition: windef.h:207
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define DEFAULT_GUI_FONT
Definition: wingdi.h:909
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define WM_SETFONT
Definition: winuser.h:1661
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by CApplicationView::CreateSearchBar().

◆ GetAddressEditBoxLocations()

LOCATIONITEM * CSearchBar::GetAddressEditBoxLocations ( WCHAR szPath)
private

Definition at line 451 of file CSearchBar.cpp.

452{
453 WCHAR szItemText[MAX_PATH], *pszPath = szPath;
454 HWND hComboboxEx = GetDlgItem(IDC_SEARCH_COMBOBOX);
455 ::GetWindowTextW(hComboboxEx, szPath, MAX_PATH);
456 INT iSelectedIndex = SendMessageW(hComboboxEx, CB_GETCURSEL, 0, 0);
457 if (iSelectedIndex != CB_ERR)
458 {
461 item.iItem = iSelectedIndex;
462 item.pszText = szItemText;
463 item.cchTextMax = _countof(szItemText);
464 SendMessageW(hComboboxEx, CBEM_GETITEMW, 0, (LPARAM)&item);
465 if (!wcscmp(szItemText, szPath))
466 {
467 LPCITEMIDLIST pidl = (LPCITEMIDLIST)item.lParam;
468 CLSID clsid;
469 HRESULT hr = GetClassOfItem(pidl, &clsid);
470 if (SUCCEEDED(hr) && clsid == CLSID_MyComputer)
471 return GetLocalDisksLocations();
472 // TODO: Shell enumerate the network neighborhood if it is chosen
473 if (!pidl || !pidl->mkid.cb)
474 return GetDesktopLocations();
475 if (GetSpecial(pidl) || !SHGetPathFromIDListW(pidl, szItemText))
476 return NULL;
477 pszPath = szItemText;
478 }
479 }
480
483 PathIsAbsolute(pszPath))
484 {
485 return BuildLocationList(&pszPath, 1);
486 }
487 return NULL;
488}
static BYTE GetSpecial(PCIDLIST_ABSOLUTE pidl)
Definition: CSearchBar.cpp:63
static LOCATIONITEM * GetDesktopLocations()
Definition: CSearchBar.cpp:137
static LOCATIONITEM * GetLocalDisksLocations()
Definition: CSearchBar.cpp:150
static HRESULT GetClassOfItem(PCIDLIST_ABSOLUTE pidl, CLSID *pCLSID)
Definition: CSearchBar.cpp:88
static LOCATIONITEM * BuildLocationList(T **rgszPaths, SIZE_T nCount)
Definition: CSearchBar.cpp:117
HWND GetDlgItem(_In_ int nID) const
Definition: atlwin.h:605
#define IDC_SEARCH_COMBOBOX
Definition: resource.h:172
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SUCCEEDED(hr)
Definition: intsafe.h:50
LPCWSTR szPath
Definition: env.c:37
static ATOM item
Definition: dde.c:856
REFCLSID clsid
Definition: msctf.c:82
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1454
#define CBEM_GETITEMW
Definition: commctrl.h:3848
#define CBEIF_TEXT
Definition: commctrl.h:3791
#define CBEIF_LPARAM
Definition: commctrl.h:3796
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static bool PathIsAbsolute(PCWSTR Path)
Definition: shellfind.h:82
HRESULT hr
Definition: shlfolder.c:183
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define _countof(array)
Definition: sndvol32.h:70
int32_t INT
Definition: typedefs.h:58
DWORD dwAttributes
Definition: vdmdbg.h:34
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1394
LONG_PTR LPARAM
Definition: windef.h:208
#define CB_ERR
Definition: winuser.h:2446
#define CB_GETCURSEL
Definition: winuser.h:1954
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by OnSearchButtonClicked().

◆ GetBandInfo()

HRESULT STDMETHODCALLTYPE CSearchBar::GetBandInfo ( DWORD  dwBandID,
DWORD  dwViewMode,
DESKBANDINFO pdbi 
)
override

Implements IDeskBand.

Definition at line 561 of file CSearchBar.cpp.

562{
563 if (!pdbi)
564 {
565 return E_INVALIDARG;
566 }
567
568 if (pdbi->dwMask & DBIM_MINSIZE)
569 {
570 pdbi->ptMinSize.x = 200;
571 pdbi->ptMinSize.y = 30;
572 }
573
574 if (pdbi->dwMask & DBIM_MAXSIZE)
575 {
576 pdbi->ptMaxSize.y = -1;
577 }
578
579 if (pdbi->dwMask & DBIM_INTEGRAL)
580 {
581 pdbi->ptIntegral.y = 1;
582 }
583
584 if (pdbi->dwMask & DBIM_ACTUAL)
585 {
586 pdbi->ptActual.x = 200;
587 pdbi->ptActual.y = 30;
588 }
589
590 if (pdbi->dwMask & DBIM_TITLE)
591 {
592 if (!LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_SEARCHLABEL, pdbi->wszTitle, _countof(pdbi->wszTitle)))
594 }
595
596 if (pdbi->dwMask & DBIM_MODEFLAGS)
597 {
598 pdbi->dwModeFlags = DBIMF_NORMAL | DBIMF_VARIABLEHEIGHT;
599 }
600
601 if (pdbi->dwMask & DBIM_BKCOLOR)
602 {
603 pdbi->dwMask &= ~DBIM_BKCOLOR;
604 }
605 return S_OK;
606}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define IDS_SEARCHLABEL
Definition: resource.h:127
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
WCHAR wszTitle[256]
Definition: shobjidl.idl:2498
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CSearchBar::GetClassID ( CLSID pClassID)
override

Implements IPersist.

Definition at line 695 of file CSearchBar.cpp.

696{
697 if (!pClassID)
698 return E_POINTER;
699 *pClassID = CLSID_FileSearchBand;
700 return S_OK;
701}
#define E_POINTER
Definition: winerror.h:2365

◆ GetIDsOfNames()

HRESULT STDMETHODCALLTYPE CSearchBar::GetIDsOfNames ( REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
override

Implements IDispatch.

Definition at line 744 of file CSearchBar.cpp.

745{
747 return E_NOTIMPL;
748}

◆ GetSearchResultsFolder()

HRESULT CSearchBar::GetSearchResultsFolder ( IShellBrowser **  ppShellBrowser,
HWND pHwnd,
IShellFolder **  ppShellFolder 
)
private

Definition at line 263 of file CSearchBar.cpp.

264{
265 HRESULT hr;
266 CComPtr<IShellBrowser> pShellBrowser;
267 if (!ppShellBrowser)
268 ppShellBrowser = &pShellBrowser;
269 if (!*ppShellBrowser)
270 {
273 return hr;
274 }
275
276 CComPtr<IShellView> pShellView;
277 hr = (*ppShellBrowser)->QueryActiveShellView(&pShellView);
278 if (FAILED(hr) || !pShellView)
279 return hr;
280
281 CComPtr<IFolderView> pFolderView;
282 hr = pShellView->QueryInterface(IID_PPV_ARG(IFolderView, &pFolderView));
283 if (FAILED(hr) || !pFolderView)
284 return hr;
285
286 CComPtr<IShellFolder> pShellFolder;
287 if (!ppShellFolder)
288 ppShellFolder = &pShellFolder;
289 hr = pFolderView->GetFolder(IID_PPV_ARG(IShellFolder, ppShellFolder));
290 if (FAILED(hr) || !pShellFolder)
291 return hr;
292
293 CLSID clsid;
294 hr = IUnknown_GetClassID(*ppShellFolder, &clsid);
295 if (FAILED(hr))
296 return hr;
297 if (clsid != CLSID_FindFolder)
298 return E_FAIL;
299
300 if (pHwnd)
301 {
302 hr = pShellView->GetWindow(pHwnd);
304 return hr;
305 }
306
307 return S_OK;
308}
CComPtr< IUnknown > m_pSite
Definition: CSearchBar.h:25
#define E_FAIL
Definition: ddrawi.h:102
#define FAILED_UNEXPECTEDLY(hr)
Definition: debug.h:83
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1501
HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID *clsid)
Definition: ordinal.c:1457
#define FAILED(hr)
Definition: intsafe.h:51
#define SID_SShellBrowser
Definition: shlguid.h:128
#define IID_PPV_ARG(Itype, ppType)

Referenced by OnSearchButtonClicked(), OnStopButtonClicked(), TrySetFocus(), and TrySubscribeToSearchEvents().

◆ GetSite()

HRESULT STDMETHODCALLTYPE CSearchBar::GetSite ( REFIID  riid,
void **  ppvSite 
)
override

Definition at line 648 of file CSearchBar.cpp.

649{
650 if (!ppvSite)
651 return E_POINTER;
652 *ppvSite = m_pSite;
653 return S_OK;
654}

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CSearchBar::GetSizeMax ( ULARGE_INTEGER pcbSize)
override

Implements IPersistStream.

Definition at line 723 of file CSearchBar.cpp.

724{
725 // TODO: calculate max size
727 return E_NOTIMPL;
728}

◆ GetTypeInfo()

HRESULT STDMETHODCALLTYPE CSearchBar::GetTypeInfo ( UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
override

Implements IDispatch.

Definition at line 738 of file CSearchBar.cpp.

739{
741 return E_NOTIMPL;
742}

◆ GetTypeInfoCount()

HRESULT STDMETHODCALLTYPE CSearchBar::GetTypeInfoCount ( UINT pctinfo)
override

Implements IDispatch.

Definition at line 732 of file CSearchBar.cpp.

733{
735 return E_NOTIMPL;
736}

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CSearchBar::GetWindow ( HWND lphwnd)
override

Implements IOleWindow.

Definition at line 521 of file CSearchBar.cpp.

522{
523 if (!lphwnd)
524 return E_INVALIDARG;
525 *lphwnd = m_hWnd;
526 return S_OK;
527}

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CSearchBar::HasFocusIO ( )
override

Definition at line 674 of file CSearchBar.cpp.

675{
676 return S_OK;
677}

◆ Invoke()

HRESULT STDMETHODCALLTYPE CSearchBar::Invoke ( DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
override

Implements IDispatch.

Definition at line 774 of file CSearchBar.cpp.

775{
776 switch (dispIdMember)
777 {
780 {
783
784 // Remove the search results folder from the address box
785 CComPtr<IDispatch> pDispatch;
786 HRESULT hResult = m_AddressEditBox->QueryInterface(IID_PPV_ARG(IDispatch, &pDispatch));
787 if (FAILED_UNEXPECTEDLY(hResult))
788 return hResult;
789 pDispatch->Invoke(dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
790 CComPtr<IShellService> pShellService;
791 hResult = m_AddressEditBox->QueryInterface(IID_PPV_ARG(IShellService, &pShellService));
792 if (FAILED_UNEXPECTEDLY(hResult))
793 return hResult;
794 hResult = pShellService->SetOwner(NULL);
795 if (FAILED_UNEXPECTEDLY(hResult))
796 return hResult;
797 HWND hComboboxEx = GetDlgItem(IDC_SEARCH_COMBOBOX);
798 INT_PTR count = SendMessageW(hComboboxEx, CB_GETCOUNT, 0, 0);
799 if (count <= 0)
800 return S_OK;
801 COMBOBOXEXITEMW item = {0};
802 item.mask = CBEIF_LPARAM;
803 item.iItem = count - 1;
804 SendMessageW(hComboboxEx, CBEM_GETITEMW, 0, (LPARAM)&item);
805 if (!item.lParam)
806 return S_OK;
807 CLSID clsid;
808 hResult = GetClassOfItem((LPCITEMIDLIST)item.lParam, &clsid);
809 if (SUCCEEDED(hResult) && clsid == CLSID_FindFolder)
810 {
811 SendMessageW(hComboboxEx, CBEM_DELETEITEM, item.iItem, 0);
812 SendMessageW(hComboboxEx, CB_SETCURSEL, 0, 0);
813 // Starting in My Computer is better than just searching the desktop folder
814 PIDLIST_ABSOLUTE pidl;
816 {
817 INT_PTR idx = FindItemInComboEx(hComboboxEx, pidl, ILIsEqual, TRUE);
818 if (idx >= 0)
819 SendMessageW(hComboboxEx, CB_SETCURSEL, idx, 0);
820 SHFree(pidl);
821 }
822 }
823
824 // Remove all non-filesystem items since we currently use FindFirstFile to search
825 BOOL fFoundBrowse = FALSE;
826 for (item.iItem = 0; SendMessageW(hComboboxEx, CBEM_GETITEMW, 0, (LPARAM)&item); item.iItem++)
827 {
828 LPCITEMIDLIST pidl = (LPCITEMIDLIST)item.lParam;
829 BYTE special = GetSpecial(pidl);
830 fFoundBrowse |= special == SPECIAL_BROWSE;
831 if (special)
832 continue;
833 const UINT fQuery = SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR;
834 SHFILEINFO shfi;
835 shfi.dwAttributes = fQuery;
836 if (SHGetFileInfoW((WCHAR*)pidl, 0, &shfi, sizeof(shfi), SHGFI_PIDL | SHGFI_ATTRIBUTES | SHGFI_ATTR_SPECIFIED))
837 {
838 if (!(shfi.dwAttributes & fQuery))
839 {
840 if (SendMessageW(hComboboxEx, CBEM_DELETEITEM, item.iItem, 0) != CB_ERR)
841 item.iItem--;
842 }
843 }
844 }
845
846 // Add our custom Browse item
847 if (!fFoundBrowse)
848 {
849 WCHAR buf[200];
851 item.iItem = -1;
852 item.iIndent = -2; // Remove space reserved for the non-existing item icon
854 item.pszText = const_cast<PWSTR>(L"...");
855 #define IDS_SEARCH_BROWSEITEM 10244 /* shell32 shresdef.h */
857 item.pszText = buf;
858 if (item.lParam)
859 SendMessageW(hComboboxEx, CBEM_INSERTITEMW, 0, (LPARAM)&item);
860 }
861
862 return S_OK;
863 }
868 return S_OK;
869 default:
870 return E_INVALIDARG;
871 }
872}
static const SPECIALFINDITEMID g_pidlBrowseDir
Definition: CSearchBar.cpp:60
@ SPECIAL_BROWSE
Definition: CSearchBar.cpp:58
#define IDS_SEARCH_BROWSEITEM
HRESULT TrySubscribeToSearchEvents()
Definition: CSearchBar.cpp:759
void SetSearchInProgress(BOOL bInProgress)
Definition: CSearchBar.cpp:750
void TrySetFocus(UINT Source)
Definition: CSearchBar.cpp:874
CComPtr< IAddressEditBox > m_AddressEditBox
Definition: CSearchBar.h:26
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int idx
Definition: utils.c:41
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3408
#define DISPID_SEARCHABORT
Definition: exdispid.h:174
#define DISPID_SEARCHCOMPLETE
Definition: exdispid.h:173
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
REFIID riid
Definition: atlbase.h:39
unsigned int UINT
Definition: ndis.h:50
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:582
#define CBEM_DELETEITEM
Definition: commctrl.h:3836
#define CBEIF_INDENT
Definition: commctrl.h:3795
#define CBEM_INSERTITEMW
Definition: commctrl.h:3846
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
Definition: shell32_main.c:430
#define SHGFI_ATTR_SPECIFIED
Definition: shellapi.h:175
#define SHGFI_ATTRIBUTES
Definition: shellapi.h:169
#define SHGFI_PIDL
Definition: shellapi.h:181
static INT_PTR FindItemInComboEx(HWND hCombo, T &FindItem, F CompareFunc, R RetMatch)
Definition: shellfind.h:59
#define CSIDL_DRIVES
Definition: shlobj.h:2197
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
DWORD dwAttributes
Definition: shellapi.h:368
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
#define DISPID_NAVIGATECOMPLETE2
Definition: webchild.h:54
#define DISPID_DOCUMENTCOMPLETE
Definition: webchild.h:61
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
#define CB_SETCURSEL
Definition: winuser.h:1972
#define CB_GETCOUNT
Definition: winuser.h:1953
unsigned char BYTE
Definition: xxhash.c:193

Referenced by OnInitDialog().

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CSearchBar::IsDirty ( void  )
override

Implements IPersistStream.

Definition at line 705 of file CSearchBar.cpp.

706{
708 return E_NOTIMPL;
709}

◆ Load()

HRESULT STDMETHODCALLTYPE CSearchBar::Load ( IStream pStm)
override

Implements IPersistStream.

Definition at line 711 of file CSearchBar.cpp.

712{
714 return E_NOTIMPL;
715}

◆ OnInitDialog()

LRESULT CSearchBar::OnInitDialog ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 185 of file CSearchBar.cpp.

186{
187 HKEY hkey;
188 DWORD dwType;
189 DWORD size = sizeof(DWORD);
191 DWORD SearchHiddenValue = 0;
192
193 result = RegOpenKeyEx(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer", 0, KEY_QUERY_VALUE, &hkey);
194 if (result == ERROR_SUCCESS)
195 {
196 if (RegQueryValueEx(hkey, L"SearchHidden", NULL, &dwType, (LPBYTE)&SearchHiddenValue, &size) == ERROR_SUCCESS)
197 {
198 if ((dwType != REG_DWORD) || (size != sizeof(DWORD)))
199 {
200 ERR("RegQueryKey for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SearchHidden\" returned error(s).\n");
201 SearchHiddenValue = 1;
202 }
203 else
204 {
205 TRACE("SearchHidden is '%d'.\n", SearchHiddenValue);
206 }
207 }
208 else
209 {
210 ERR("RegQueryKey for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SearchHidden\" Failed.\n");
211 }
212 RegCloseKey(hkey);
213 }
214 else
215 ERR("RegOpenKey for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\" Failed.\n");
216
217 if (SearchHiddenValue != 0)
219 else
221
223
225 CComPtr<IImageList> pImageList;
226 HRESULT hResult = SHGetImageList(SHIL_SMALL, IID_PPV_ARG(IImageList, &pImageList));
227 SendMessage(hCombobox, CBEM_SETIMAGELIST, 0, FAILED_UNEXPECTEDLY(hResult) ? 0 : reinterpret_cast<LPARAM>(pImageList.p));
228
231 HWND hEditControl = reinterpret_cast<HWND>(SendMessage(hCombobox, CBEM_GETEDITCONTROL, 0, 0));
232 hResult = CAddressEditBox_CreateInstance(IID_PPV_ARG(IAddressEditBox, &m_AddressEditBox));
233 if (FAILED_UNEXPECTEDLY(hResult))
234 return FALSE;
235
236 hResult = m_AddressEditBox->Init(hCombobox, hEditControl, 0, m_pSite);
237 if (FAILED_UNEXPECTEDLY(hResult))
238 return FALSE;
239
240 // Subscribe to navigation events
241 CComPtr<IShellBrowser> pShellBrowser;
243 DWORD dwAdviseCookie;
244 if (SUCCEEDED(hResult))
245 AtlAdvise(pShellBrowser, static_cast<IDispatch *>(this), DIID_DWebBrowserEvents, &dwAdviseCookie);
246
247 // Invoke the navigate event in case a search results folder is already open
248 DISPPARAMS params = {0};
250
251 return TRUE;
252}
#define ERR(fmt,...)
Definition: precomp.h:57
#define RegCloseKey(hKey)
Definition: registry.h:49
HRESULT CAddressEditBox_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:33
BOOL CheckDlgButton(int nIDButton, UINT nCheck)
Definition: atlwin.h:369
STDMETHOD() Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override
Definition: CSearchBar.cpp:774
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
Definition: atl.c:45
#define IDC_SEARCH_HIDDEN
Definition: resource.h:173
GLsizeiptr size
Definition: glext.h:5919
GLenum const GLfloat * params
Definition: glext.h:5645
GLuint64EXT * result
Definition: glext.h:11304
#define GUID_NULL
Definition: ks.h:106
struct stdole::DISPPARAMS DISPPARAMS
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define DWORD
Definition: nt_native.h:44
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define CBEM_SETEXTENDEDSTYLE
Definition: commctrl.h:3840
#define CBEM_SETIMAGELIST
Definition: commctrl.h:3832
#define CBES_EX_NOSIZELIMIT
Definition: commctrl.h:3859
#define CBES_EX_CASESENSITIVE
Definition: commctrl.h:3860
#define CBEM_GETEDITCONTROL
Definition: commctrl.h:3838
#define REG_DWORD
Definition: sdbapi.c:596
#define SHIL_SMALL
Definition: shellapi.h:186
HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
Definition: shellord.c:2674
unsigned char * LPBYTE
Definition: typedefs.h:53
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define RegOpenKeyEx
Definition: winreg.h:520
#define RegQueryValueEx
Definition: winreg.h:524
#define BST_UNCHECKED
Definition: winuser.h:199
#define SendMessage
Definition: winuser.h:5863
#define BST_CHECKED
Definition: winuser.h:197

◆ OnLocationEditChange()

LRESULT CSearchBar::OnLocationEditChange ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)
private

Definition at line 405 of file CSearchBar.cpp.

406{
407 HWND hComboboxEx = hWndCtl;
408 INT_PTR idx = SendMessageW(hComboboxEx, CB_GETCURSEL, 0, 0);
409 if (idx < 0)
410 return 0;
412 item.mask = CBEIF_LPARAM;
413 item.iItem = idx;
414 item.cchTextMax = 0;
415 if (!SendMessageW(hComboboxEx, CBEM_GETITEMW, 0, (LPARAM)&item) ||
417 {
419 return 0;
420 }
421
422 idx = max(m_RealItemIndex, 0);
423 SendMessageW(hComboboxEx, CB_SETCURSEL, idx, 0); // Reset to previous item
424
425 BROWSEINFOW bi = { hComboboxEx };
427 if (PIDLIST_ABSOLUTE pidl = SHBrowseForFolderW(&bi))
428 {
429 idx = FindItemInComboEx(hComboboxEx, pidl, ILIsEqual, TRUE);
430 if (idx < 0)
431 {
432 SHFILEINFO shfi;
433 if (SHGetFileInfoW((WCHAR*)pidl, 0, &shfi, sizeof(shfi), SHGFI_PIDL | SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX))
434 {
436 item.iItem = -1;
437 item.iImage = item.iSelectedImage = shfi.iIcon;
438 item.pszText = shfi.szDisplayName;
439 item.lParam = (LPARAM)pidl; // IAddressEditBox takes ownership
440 idx = SendMessageW(hComboboxEx, CBEM_INSERTITEMW, 0, (LPARAM)&item);
441 }
442 }
443 if (idx >= 0)
444 SendMessageW(hComboboxEx, CB_SETCURSEL, idx, 0); // Select the browsed item
445 else
446 SHFree(pidl);
447 }
448 return 0;
449}
EXTERN_C LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brfolder.cpp:1460
INT_PTR m_RealItemIndex
Definition: CSearchBar.h:27
#define CBEIF_IMAGE
Definition: commctrl.h:3792
#define CBEIF_SELECTEDIMAGE
Definition: commctrl.h:3793
#define SHGFI_SYSICONINDEX
Definition: shellapi.h:172
#define SHGFI_DISPLAYNAME
Definition: shellapi.h:167
#define BIF_RETURNONLYFSDIRS
Definition: shlobj.h:1225
#define BIF_NEWDIALOGSTYLE
Definition: shlobj.h:1231
CHAR szDisplayName[MAX_PATH]
Definition: shellapi.h:369
UINT ulFlags
Definition: shlobj.h:1212
#define max(a, b)
Definition: svc.c:63

◆ OnSearchButtonClicked()

LRESULT CSearchBar::OnSearchButtonClicked ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)
private

Definition at line 310 of file CSearchBar.cpp.

311{
312 size_t len = 0;
313 WCHAR endchar;
314 WCHAR startchar;
315
316 CComHeapPtr<SearchStart> pSearchStart(static_cast<SearchStart *>(CoTaskMemAlloc(sizeof(SearchStart))));
317 GetDlgItemText(IDC_SEARCH_FILENAME, pSearchStart->szFileName, _countof(pSearchStart->szFileName));
318 GetDlgItemText(IDC_SEARCH_QUERY, pSearchStart->szQuery, _countof(pSearchStart->szQuery));
319
320 pSearchStart->SearchHidden = IsDlgButtonChecked(IDC_SEARCH_HIDDEN);
321
323 pSearchStart->pPaths = GetAddressEditBoxLocations(buf);
324 if (!pSearchStart->pPaths)
325 {
326 ShellMessageBoxW(_AtlBaseModule.GetResourceInstance(), m_hWnd, MAKEINTRESOURCEW(IDS_SEARCHINVALID),
328 return 0;
329 }
330 ScopedFreeLocationItems FreeLocationsHelper(pSearchStart->pPaths);
331
332 // See if we have an szFileName by testing for its entry lenth > 0 and our searched FileName does not contain
333 // an asterisk or a question mark. If so, then prepend and append an asterisk to the searched FileName.
334 // (i.e. it's equivalent to searching for *<the_file_name>* )
335 if (FAILED (StringCchLengthW (pSearchStart->szFileName, MAX_PATH, &len))) return 0;
336 if ((len > 0) && !wcspbrk(pSearchStart->szFileName, L"*?"))
337 {
338 endchar = pSearchStart->szFileName[len - 1];
339 startchar = pSearchStart->szFileName[0];
340 if ((len < MAX_PATH - 1) && (startchar != L'*'))
341 {
342 memmove(&pSearchStart->szFileName[1], &pSearchStart->szFileName[0],
343 len * sizeof(WCHAR) + sizeof(WCHAR));
344 len = len + 1;
345 pSearchStart->szFileName[0] = L'*';
346 }
347
348 // See if our last character is an asterisk and if not and we have room then add one
349 if ((len < MAX_PATH - 1) && (endchar != L'*'))
350 StringCchCatW(pSearchStart->szFileName, MAX_PATH, L"*");
351 }
352
353 // Print our final search string for szFileName
354 TRACE("Searched szFileName is '%S'.\n", pSearchStart->szFileName);
355
356 CComPtr<IShellBrowser> pShellBrowser;
359 return 0;
360
361 HWND hwnd;
362 if (FAILED(GetSearchResultsFolder(&pShellBrowser, &hwnd, NULL)))
363 {
364 // Open a new search results folder
365 WCHAR szShellGuid[MAX_PATH];
366 const WCHAR shellGuidPrefix[] = L"shell:::";
367 memcpy(szShellGuid, shellGuidPrefix, sizeof(shellGuidPrefix));
368 hr = StringFromGUID2(CLSID_FindFolder, szShellGuid + _countof(shellGuidPrefix) - 1,
369 _countof(szShellGuid) - _countof(shellGuidPrefix));
371 return 0;
372
373 CComHeapPtr<ITEMIDLIST> findFolderPidl;
374 hr = SHParseDisplayName(szShellGuid, NULL, &findFolderPidl, 0, NULL);
376 return 0;
377
378 hr = pShellBrowser->BrowseObject(findFolderPidl, 0);
380 return 0;
381
382 hr = GetSearchResultsFolder(&pShellBrowser, &hwnd, NULL);
384 return 0;
385 }
386
387 FreeLocationsHelper.Detach();
388 ::PostMessageW(hwnd, WM_SEARCH_START, 0, (LPARAM) pSearchStart.Detach());
389
391
392 return 0;
393}
UINT IsDlgButtonChecked(int nIDButton) const
Definition: atlwin.h:926
HRESULT GetSearchResultsFolder(IShellBrowser **ppShellBrowser, HWND *pHwnd, IShellFolder **ppShellFolder)
Definition: CSearchBar.cpp:263
LOCATIONITEM * GetAddressEditBoxLocations(WCHAR *szPath)
Definition: CSearchBar.cpp:451
#define IDS_SEARCHINVALID
Definition: resource.h:174
#define IDC_SEARCH_FILENAME
Definition: resource.h:168
#define IDC_SEARCH_QUERY
Definition: resource.h:169
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
#define ShellMessageBoxW
Definition: precomp.h:63
GLenum GLsizei len
Definition: glext.h:6722
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
Definition: pidl.c:1506
_Check_return_ _CRTIMP _CONST_RETURN wchar_t *__cdecl wcspbrk(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_Control)
#define WM_SEARCH_START
Definition: shellfind.h:29
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
STRSAFEAPI StringCchLengthW(STRSAFE_LPCWSTR psz, size_t cchMax, size_t *pcchLength)
Definition: strsafe.h:842
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GetDlgItemText
Definition: winuser.h:5805
#define MB_ICONERROR
Definition: winuser.h:798
#define MB_OK
Definition: winuser.h:801
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

◆ OnSetFocus()

LRESULT CSearchBar::OnSetFocus ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 256 of file CSearchBar.cpp.

257{
258 IUnknown_OnFocusChangeIS(m_pSite, static_cast<IDeskBand *>(this), TRUE);
259 bHandled = FALSE;
260 return TRUE;
261}
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
Definition: ordinal.c:4804

◆ OnSize()

LRESULT CSearchBar::OnSize ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 490 of file CSearchBar.cpp.

491{
492 INT iWidth = LOWORD(lParam);
493 INT iPadding = 10;
494
496
498 HDWP hdwp = BeginDeferWindowPos(_countof(inputs));
499 for (SIZE_T i = 0; i < _countof(inputs); i++)
500 {
501 CWindow wnd = (CWindow) GetDlgItem(inputs[i]);
502 RECT rect;
503 wnd.GetWindowRect(&rect);
504 POINT pt = { rect.left, rect.top };
506 hdwp = wnd.DeferWindowPos(hdwp,
507 HWND_TOP,
508 iPadding,
509 pt.y,
510 iWidth - iPadding * 2,
511 rect.bottom - rect.top,
513 }
514 EndDeferWindowPos(hdwp);
515
516 return 0;
517}
BOOL SetWindowPos(HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
Definition: atlwin.h:1288
BOOL ScreenToClient(LPPOINT lpPoint) const
Definition: atlwin.h:1092
HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
Definition: atlwin.h:456
BOOL GetWindowRect(LPRECT lpRect) const
Definition: atlwin.h:816
LPARAM lParam
Definition: combotst.c:139
#define IDC_SEARCH_BUTTON
Definition: resource.h:170
#define IDC_SEARCH_LABEL
Definition: resource.h:167
#define IDC_SEARCH_STOP_BUTTON
Definition: resource.h:171
#define IDC_PROGRESS_BAR
Definition: resource.h:140
#define pt(x, y)
Definition: drawing.c:79
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
Definition: glfuncs.h:248
#define LOWORD(l)
Definition: pedump.c:82
& rect
Definition: startmenu.cpp:1413
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define SWP_NOMOVE
Definition: winuser.h:1255
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define HWND_TOP
Definition: winuser.h:1218
#define SWP_NOCOPYBITS
Definition: winuser.h:1254
#define SWP_NOOWNERZORDER
Definition: winuser.h:1260
#define SWP_NOZORDER
Definition: winuser.h:1258
HDWP WINAPI BeginDeferWindowPos(_In_ int)

◆ OnStopButtonClicked()

LRESULT CSearchBar::OnStopButtonClicked ( WORD  wNotifyCode,
WORD  wID,
HWND  hWndCtl,
BOOL bHandled 
)
private

Definition at line 395 of file CSearchBar.cpp.

396{
397 HWND hwnd;
399 if (SUCCEEDED(hr))
401
402 return 0;
403}
#define WM_SEARCH_STOP
Definition: shellfind.h:30

◆ ResizeBorderDW()

HRESULT STDMETHODCALLTYPE CSearchBar::ResizeBorderDW ( const RECT prcBorder,
IUnknown punkToolbarSite,
BOOL  fReserved 
)
override

Definition at line 544 of file CSearchBar.cpp.

545{
546 /* Must return E_NOTIMPL according to MSDN */
547 return E_NOTIMPL;
548}

◆ Save()

HRESULT STDMETHODCALLTYPE CSearchBar::Save ( IStream pStm,
BOOL  fClearDirty 
)
override

Implements IPersistStream.

Definition at line 717 of file CSearchBar.cpp.

718{
720 return E_NOTIMPL;
721}

◆ SetSearchInProgress()

void CSearchBar::SetSearchInProgress ( BOOL  bInProgress)
private

Definition at line 750 of file CSearchBar.cpp.

751{
754 HWND hProgressBar = GetDlgItem(IDC_PROGRESS_BAR);
755 ::ShowWindow(hProgressBar, bInProgress ? SW_SHOW : SW_HIDE);
756 ::PostMessage(hProgressBar, PBM_SETMARQUEE, bInProgress, 0);
757}
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1333
#define PBM_SETMARQUEE
Definition: commctrl.h:2204
#define SW_HIDE
Definition: winuser.h:779
#define PostMessage
Definition: winuser.h:5852
#define SW_SHOW
Definition: winuser.h:786

Referenced by Invoke(), OnInitDialog(), and OnSearchButtonClicked().

◆ SetSite()

HRESULT STDMETHODCALLTYPE CSearchBar::SetSite ( IUnknown pUnkSite)
override

Implements IObjectWithSite.

Definition at line 610 of file CSearchBar.cpp.

611{
612 HRESULT hr;
613 HWND parentWnd;
614
615 if (pUnkSite == m_pSite)
616 return S_OK;
617
618 TRACE("SetSite called \n");
619 if (!pUnkSite)
620 {
622 m_hWnd = NULL;
623 return S_OK;
624 }
625
626 hr = IUnknown_GetWindow(pUnkSite, &parentWnd);
627 if (!SUCCEEDED(hr))
628 {
629 ERR("Could not get parent's window ! Status: %08lx\n", hr);
630 return E_INVALIDARG;
631 }
632
633 m_pSite = pUnkSite;
634
635 if (m_hWnd)
636 {
637 // Change its parent
638 SetParent(parentWnd);
639 }
640 else
641 {
642 CDialogImpl::Create(parentWnd);
643
644 }
645 return S_OK;
646}
HWND Create(HWND hWndParent, LPARAM dwInitParam=0)
Definition: atlwin.h:1487
HWND SetParent(HWND hWndNewParent)
Definition: atlwin.h:1228
BOOL DestroyWindow()
Definition: atlwin.h:462
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1336

◆ SetText()

VOID CSearchBar::SetText ( LPCWSTR  lpszText)

Definition at line 235 of file appview.cpp.

236{
238}
#define SBT_NOBORDERS
Definition: commctrl.h:1976
#define SB_SETTEXT
Definition: commctrl.h:1954

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CSearchBar::ShowDW ( BOOL  fShow)
override

Implements IDockingWindow.

Definition at line 550 of file CSearchBar.cpp.

551{
552 m_bVisible = fShow;
553 ShowWindow(fShow);
554 if (fShow)
556 return S_OK;
557}
BOOL m_bVisible
Definition: CSearchBar.h:28
#define DISPID_WINDOWSTATECHANGED
Definition: exdispid.h:69

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CSearchBar::TranslateAcceleratorIO ( LPMSG  lpMsg)
override

Definition at line 679 of file CSearchBar.cpp.

680{
681 if (IsDialogMessage(lpMsg))
682 return S_OK;
683
684 if ((lpMsg->hwnd == m_hWnd || IsChild(lpMsg->hwnd)))
685 {
686 TranslateMessage(lpMsg);
687 DispatchMessage(lpMsg);
688 return S_OK;
689 }
690
691 return S_FALSE;
692}
BOOL IsChild(const HWND hWnd) const
Definition: atlwin.h:914
HWND hwnd
Definition: winuser.h:3125
#define S_FALSE
Definition: winerror.h:2357
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define IsDialogMessage
Definition: winuser.h:5829
#define DispatchMessage
Definition: winuser.h:5785

◆ TrySetFocus()

void CSearchBar::TrySetFocus ( UINT  Source)
private

Definition at line 874 of file CSearchBar.cpp.

875{
876 CComPtr<IShellBrowser> pBrowser;
877 CComPtr<IShellView> pResultsSV;
878 if (SUCCEEDED(GetSearchResultsFolder(&pBrowser, NULL, NULL)))
879 pBrowser->QueryActiveShellView(&pResultsSV);
880 UINT cItems = pResultsSV ? GetShellViewItemCount(pResultsSV) : 0;
881
882 // Attempt to set the focus if we are not in the results folder or if there are no results
883 HWND hWndFocus = ::GetFocus();
884 if (!hWndFocus || !pResultsSV || cItems == 0)
885 {
886 BOOL IsOnButton = GetDlgItem(IDC_SEARCH_BUTTON) == hWndFocus;
887 BOOL IsOnSelfPane = hWndFocus == m_hWnd;
888 if (!hWndFocus || IsOnSelfPane || IsOnButton || !IsWindowChildOf(hWndFocus, m_hWnd))
890 }
891}
static UINT GetShellViewItemCount(IShellView *pSV)
Definition: CSearchBar.cpp:37
static BOOL IsWindowChildOf(const HWND hNeedle, const HWND hRoot)
Definition: CSearchBar.cpp:23
HWND WINAPI GetFocus(void)
Definition: window.c:1875
#define WM_NEXTDLGCTL
Definition: winuser.h:1654

Referenced by Invoke(), and ShowDW().

◆ TrySubscribeToSearchEvents()

HRESULT CSearchBar::TrySubscribeToSearchEvents ( )
private

Definition at line 759 of file CSearchBar.cpp.

760{
761 CComPtr<IShellFolder> pShellFolder;
762 HRESULT hr = GetSearchResultsFolder(NULL, NULL, &pShellFolder);
763 if (FAILED(hr))
764 return hr;
765
766 DWORD fAdviseCookie;
767 hr = AtlAdvise(pShellFolder, static_cast<IDispatch *>(this), DIID_DSearchCommandEvents, &fAdviseCookie);
769 return hr;
770
771 return S_OK;
772}

Referenced by Invoke().

◆ UIActivateIO()

HRESULT STDMETHODCALLTYPE CSearchBar::UIActivateIO ( BOOL  fActivate,
LPMSG  lpMsg 
)
override

Definition at line 658 of file CSearchBar.cpp.

659{
660 if (fActivate)
661 {
662 //SetFocus();
664 }
665 // TODO: handle message
666 if(lpMsg)
667 {
668 TranslateMessage(lpMsg);
669 DispatchMessage(lpMsg);
670 }
671 return S_OK;
672}
HWND SetActiveWindow()
Definition: atlwin.h:1162

Member Data Documentation

◆ m_AddressEditBox

CComPtr<IAddressEditBox> CSearchBar::m_AddressEditBox
private

Definition at line 26 of file CSearchBar.h.

Referenced by Invoke(), and OnInitDialog().

◆ m_bVisible

BOOL CSearchBar::m_bVisible
private

Definition at line 28 of file CSearchBar.h.

Referenced by ShowDW().

◆ m_Height

const INT CSearchBar::m_Height

Definition at line 309 of file appview.h.

Referenced by Create().

◆ m_pSite

CComPtr<IUnknown> CSearchBar::m_pSite
private

◆ m_RealItemIndex

INT_PTR CSearchBar::m_RealItemIndex
private

Definition at line 27 of file CSearchBar.h.

Referenced by OnLocationEditChange().

◆ m_Width

const INT CSearchBar::m_Width

Definition at line 308 of file appview.h.

Referenced by Create(), and CApplicationView::OnSize().


The documentation for this class was generated from the following files: